Daemon: do not exit with internal error on invalid arguments
Invalid compiler arguments should lead to a compilation error, not internal error. This has been fixed by splitting the "parseArguments(...)" call (which does parsing + validation) in CompileServiceImpl into two calls of parseCommandLineArguments + validateArguments, and returning with a compilation error if the latter did not succeed #KT-16057 Fixed #KT-14848 In Progress
This commit is contained in:
@@ -106,7 +106,7 @@ abstract class CLITool<A : CommonToolArguments> {
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract fun createArguments(): A
|
||||
abstract fun createArguments(): A
|
||||
|
||||
// Used in kotlin-maven-plugin (KotlinCompileMojoBase) and in kotlin-gradle-plugin (KotlinJvmOptionsImpl, KotlinJsOptionsImpl)
|
||||
fun parseArguments(args: Array<out String>, arguments: A) {
|
||||
|
||||
@@ -82,7 +82,7 @@ public class K2JSCompiler extends CLICompiler<K2JSCompilerArguments> {
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected K2JSCompilerArguments createArguments() {
|
||||
public K2JSCompilerArguments createArguments() {
|
||||
return new K2JSCompilerArguments();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user