diff --git a/compiler/cli/cli-common/src/org/jetbrains/jet/cli/common/arguments/CommonCompilerArguments.java b/compiler/cli/cli-common/src/org/jetbrains/jet/cli/common/arguments/CommonCompilerArguments.java index f276e1cc217..d941f9c1cc0 100644 --- a/compiler/cli/cli-common/src/org/jetbrains/jet/cli/common/arguments/CommonCompilerArguments.java +++ b/compiler/cli/cli-common/src/org/jetbrains/jet/cli/common/arguments/CommonCompilerArguments.java @@ -18,8 +18,10 @@ package org.jetbrains.jet.cli.common.arguments; import com.intellij.util.SmartList; import com.sampullara.cli.Argument; +import org.jetbrains.annotations.NotNull; import java.util.List; + import static org.jetbrains.jet.cli.common.arguments.CommonArgumentConstants.SUPPRESS_WARNINGS; public abstract class CommonCompilerArguments { @@ -35,7 +37,8 @@ public abstract class CommonCompilerArguments { @Argument(value = "help", alias = "h", description = "Print a synopsis of standard options") public boolean help; - @Argument(value = "suppress", description = "Suppress compiler messages by severity (" + SUPPRESS_WARNINGS + ")") + @Argument(value = "suppress", description = "Suppress all compiler warnings") + @ValueDescription(SUPPRESS_WARNINGS) public String suppress; @Argument(value = "printArgs", description = "Print command line arguments") @@ -47,6 +50,11 @@ public abstract class CommonCompilerArguments { return SUPPRESS_WARNINGS.equalsIgnoreCase(suppress); } + @NotNull + public String executableScriptFileName() { + return "kotlinc"; + } + // Used only for serialize and deserialize settings. Don't use in other places! public static final class DummyImpl extends CommonCompilerArguments {} } diff --git a/compiler/cli/cli-common/src/org/jetbrains/jet/cli/common/arguments/K2JSCompilerArguments.java b/compiler/cli/cli-common/src/org/jetbrains/jet/cli/common/arguments/K2JSCompilerArguments.java index 5ed8f04927a..f7a01cecdbd 100644 --- a/compiler/cli/cli-common/src/org/jetbrains/jet/cli/common/arguments/K2JSCompilerArguments.java +++ b/compiler/cli/cli-common/src/org/jetbrains/jet/cli/common/arguments/K2JSCompilerArguments.java @@ -17,6 +17,7 @@ package org.jetbrains.jet.cli.common.arguments; import com.sampullara.cli.Argument; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import static org.jetbrains.jet.cli.common.arguments.K2JsArgumentConstants.CALL; @@ -27,28 +28,40 @@ import static org.jetbrains.jet.cli.common.arguments.K2JsArgumentConstants.NO_CA */ public class K2JSCompilerArguments extends CommonCompilerArguments { @Argument(value = "output", description = "Output file path") + @ValueDescription("") public String outputFile; - @Argument(value = "libraryFiles", description = "Path to zipped lib sources or kotlin files") + @Argument(value = "libraryFiles", description = "Path to zipped library sources or kotlin files separated by commas") + @ValueDescription("") public String[] libraryFiles; - @Argument(value = "sourceFiles", description = "Source files (dir or file)") + @Argument(value = "sourceFiles", description = "Source files or directories separated by commas") + @ValueDescription("") public String[] sourceFiles; @Argument(value = "sourcemap", description = "Generate SourceMap") public boolean sourcemap; @Argument(value = "target", description = "Generate JS files for specific ECMA version (only ECMA 5 is supported)") + @ValueDescription("") public String target; @Nullable - @Argument(value = "main", description = "Whether a main function should be called; either '" + CALL + - "' or '" + NO_CALL + "', default '" + CALL + "' (main function will be auto detected)") + @Argument(value = "main", description = "Whether a main function should be called; default '" + CALL + "' (main function will be auto detected)") + @ValueDescription("{" + CALL + "," + NO_CALL + "}") public String main; @Argument(value = "outputPrefix", description = "Path to file which will be added to the beginning of output file") + @ValueDescription("") public String outputPrefix; @Argument(value = "outputPostfix", description = "Path to file which will be added to the end of output file") + @ValueDescription("") public String outputPostfix; + + @Override + @NotNull + public String executableScriptFileName() { + return "kotlinc-js"; + } } diff --git a/compiler/cli/cli-common/src/org/jetbrains/jet/cli/common/arguments/K2JVMCompilerArguments.java b/compiler/cli/cli-common/src/org/jetbrains/jet/cli/common/arguments/K2JVMCompilerArguments.java index 75013761f43..6b2d162d64b 100644 --- a/compiler/cli/cli-common/src/org/jetbrains/jet/cli/common/arguments/K2JVMCompilerArguments.java +++ b/compiler/cli/cli-common/src/org/jetbrains/jet/cli/common/arguments/K2JVMCompilerArguments.java @@ -19,6 +19,7 @@ package org.jetbrains.jet.cli.common.arguments; import com.sampullara.cli.Argument; +import org.jetbrains.annotations.NotNull; /** * Command line arguments for K2JVMCompiler @@ -26,18 +27,23 @@ import com.sampullara.cli.Argument; @SuppressWarnings("UnusedDeclaration") public class K2JVMCompilerArguments extends CommonCompilerArguments { @Argument(value = "src", description = "Source file or directory (allows many paths separated by the system path separator)") + @ValueDescription("") public String src; @Argument(value = "jar", description = "Resulting .jar file path") + @ValueDescription("") public String jar; @Argument(value = "output", description = "Output directory path for .class files") + @ValueDescription("") public String outputDir; @Argument(value = "classpath", description = "Paths where to find user class files") + @ValueDescription("") public String classpath; @Argument(value = "annotations", description = "Paths to external annotations") + @ValueDescription("") public String annotations; @Argument(value = "includeRuntime", description = "Include Kotlin runtime in to resulting .jar") @@ -59,14 +65,23 @@ public class K2JVMCompilerArguments extends CommonCompilerArguments { public boolean notNullParamAssertions; @Argument(value = "module", description = "Path to the module file to compile") + @ValueDescription("") public String module; @Argument(value = "script", description = "Evaluate the script file") public boolean script; @Argument(value = "kotlinHome", description = "Path to Kotlin compiler home directory, used for annotations and runtime libraries discovery") + @ValueDescription("") public String kotlinHome; - @Argument(value = "inline", description = "Inlining mode: on/off (default is on)") + @Argument(value = "inline", description = "Inlining mode (default is on)") + @ValueDescription("{on,off}") public String inline; + + @Override + @NotNull + public String executableScriptFileName() { + return "kotlinc-jvm"; + } } diff --git a/compiler/cli/cli-common/src/org/jetbrains/jet/cli/common/arguments/ValueDescription.java b/compiler/cli/cli-common/src/org/jetbrains/jet/cli/common/arguments/ValueDescription.java new file mode 100644 index 00000000000..f0e6480129d --- /dev/null +++ b/compiler/cli/cli-common/src/org/jetbrains/jet/cli/common/arguments/ValueDescription.java @@ -0,0 +1,28 @@ +/* + * Copyright 2010-2014 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jetbrains.jet.cli.common.arguments; + +import org.jetbrains.annotations.NotNull; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +@Retention(RetentionPolicy.RUNTIME) +public @interface ValueDescription { + @NotNull + String value(); +} diff --git a/compiler/cli/src/org/jetbrains/jet/cli/common/Usage.java b/compiler/cli/src/org/jetbrains/jet/cli/common/Usage.java index a43bb48d041..d6d53997bce 100644 --- a/compiler/cli/src/org/jetbrains/jet/cli/common/Usage.java +++ b/compiler/cli/src/org/jetbrains/jet/cli/common/Usage.java @@ -20,94 +20,58 @@ import com.sampullara.cli.Argument; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.jet.cli.common.arguments.CommonCompilerArguments; +import org.jetbrains.jet.cli.common.arguments.ValueDescription; import java.io.PrintStream; -import java.lang.reflect.Array; import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.List; class Usage { - private final PrintStream out; - - private Usage(@NotNull PrintStream out) { - this.out = out; - } + // The magic number 29 corresponds to the similar padding width in javac and scalac command line compilers + private static final int OPTION_NAME_PADDING_WIDTH = 29; public static void print(@NotNull PrintStream target, @NotNull CommonCompilerArguments arguments) { - new Usage(target).print(arguments); - } - - private void print(@NotNull CommonCompilerArguments arguments) { - Class clazz = arguments.getClass(); - out.println("Usage: " + clazz.getName()); - for (Class currentClass = clazz; currentClass != null; currentClass = currentClass.getSuperclass()) { - for (Field field : currentClass.getDeclaredFields()) { - Argument argument = field.getAnnotation(Argument.class); - if (argument == null) continue; - - try { - printFieldUsage(field, field.get(arguments), argument); - } - catch (IllegalAccessException e) { - throw new IllegalArgumentException("Could not use the field " + field + " as an argument field", e); + target.println("Usage: " + arguments.executableScriptFileName() + " "); + target.println("where possible options include:"); + for (Class clazz = arguments.getClass(); clazz != null; clazz = clazz.getSuperclass()) { + for (Field field : clazz.getDeclaredFields()) { + String usage = fieldUsage(field); + if (usage != null) { + target.println(usage); } } } } - private void printFieldUsage(@NotNull Field field, @Nullable Object defaultValue, @NotNull Argument argument) { + @Nullable + private static String fieldUsage(@NotNull Field field) { + Argument argument = field.getAnnotation(Argument.class); + if (argument == null) return null; + ValueDescription description = field.getAnnotation(ValueDescription.class); + String prefix = argument.prefix(); - Class type = field.getType(); - String description = argument.description(); StringBuilder sb = new StringBuilder(" "); sb.append(prefix); - if (argument.value().equals("")) { + if (argument.value().isEmpty()) { sb.append(field.getName()); } else { sb.append(argument.value()); } - if (!argument.alias().equals("")) { + if (!argument.alias().isEmpty()) { sb.append(" ("); sb.append(prefix); sb.append(argument.alias()); sb.append(")"); } - if (type == Boolean.TYPE || type == Boolean.class) { - sb.append(" [flag] "); - sb.append(description); + if (description != null) { + sb.append(" "); + sb.append(description.value()); } - else { - sb.append(" ["); - if (type.isArray()) { - sb.append(type.getComponentType().getSimpleName()); - sb.append("["); - sb.append(argument.delimiter()); - sb.append("]"); - } - else { - sb.append(type.getSimpleName()); - } - sb.append("] "); - sb.append(description); - if (defaultValue != null) { - sb.append(" ("); - if (type.isArray()) { - int len = Array.getLength(defaultValue); - List list = new ArrayList(len); - for (int i = 0; i < len; i++) { - list.add(Array.get(defaultValue, i)); - } - sb.append(list); - } - else { - sb.append(defaultValue); - } - sb.append(")"); - } + while (sb.length() < OPTION_NAME_PADDING_WIDTH) { + sb.append(" "); } - out.println(sb); + sb.append(argument.description()); + return sb.toString(); } } diff --git a/compiler/testData/cli/js/jsHelp.out b/compiler/testData/cli/js/jsHelp.out index 2f4778ace97..8641c254d2a 100644 --- a/compiler/testData/cli/js/jsHelp.out +++ b/compiler/testData/cli/js/jsHelp.out @@ -1,16 +1,17 @@ -Usage: org.jetbrains.jet.cli.common.arguments.K2JSCompilerArguments - -output [String] Output file path - -libraryFiles [String[,]] Path to zipped lib sources or kotlin files - -sourceFiles [String[,]] Source files (dir or file) - -sourcemap [flag] Generate SourceMap - -target [String] Generate JS files for specific ECMA version (only ECMA 5 is supported) - -main [String] Whether a main function should be called; either 'call' or 'noCall', default 'call' (main function will be auto detected) - -outputPrefix [String] Path to file which will be added to the beginning of output file - -outputPostfix [String] Path to file which will be added to the end of output file - -tags [flag] Demarcate each compilation message (error, warning, etc) with an open and close tag - -verbose [flag] Enable verbose logging output - -version [flag] Display compiler version - -help (-h) [flag] Print a synopsis of standard options - -suppress [String] Suppress compiler messages by severity (warnings) - -printArgs [flag] Print command line arguments +Usage: kotlinc-js +where possible options include: + -output Output file path + -libraryFiles Path to zipped library sources or kotlin files separated by commas + -sourceFiles Source files or directories separated by commas + -sourcemap Generate SourceMap + -target Generate JS files for specific ECMA version (only ECMA 5 is supported) + -main {call,noCall} Whether a main function should be called; default 'call' (main function will be auto detected) + -outputPrefix Path to file which will be added to the beginning of output file + -outputPostfix Path to file which will be added to the end of output file + -tags Demarcate each compilation message (error, warning, etc) with an open and close tag + -verbose Enable verbose logging output + -version Display compiler version + -help (-h) Print a synopsis of standard options + -suppress warnings Suppress all compiler warnings + -printArgs Print command line arguments OK \ No newline at end of file diff --git a/compiler/testData/cli/jvm/help.out b/compiler/testData/cli/jvm/help.out index e1b9c316922..93f42398265 100644 --- a/compiler/testData/cli/jvm/help.out +++ b/compiler/testData/cli/jvm/help.out @@ -1,23 +1,24 @@ -Usage: org.jetbrains.jet.cli.common.arguments.K2JVMCompilerArguments - -src [String] Source file or directory (allows many paths separated by the system path separator) - -jar [String] Resulting .jar file path - -output [String] Output directory path for .class files - -classpath [String] Paths where to find user class files - -annotations [String] Paths to external annotations - -includeRuntime [flag] Include Kotlin runtime in to resulting .jar - -noJdk [flag] Don't include Java runtime into classpath - -noStdlib [flag] Don't include Kotlin runtime into classpath - -noJdkAnnotations [flag] Don't include JDK external annotations into classpath - -notNullAssertions [flag] Generate not-null assertion after each invocation of method returning not-null - -notNullParamAssertions [flag] Generate not-null assertions on parameters of methods accessible from Java - -module [String] Path to the module file to compile - -script [flag] Evaluate the script file - -kotlinHome [String] Path to Kotlin compiler home directory, used for annotations and runtime libraries discovery - -inline [String] Inlining mode: on/off (default is on) - -tags [flag] Demarcate each compilation message (error, warning, etc) with an open and close tag - -verbose [flag] Enable verbose logging output - -version [flag] Display compiler version - -help (-h) [flag] Print a synopsis of standard options - -suppress [String] Suppress compiler messages by severity (warnings) - -printArgs [flag] Print command line arguments +Usage: kotlinc-jvm +where possible options include: + -src Source file or directory (allows many paths separated by the system path separator) + -jar Resulting .jar file path + -output Output directory path for .class files + -classpath Paths where to find user class files + -annotations Paths to external annotations + -includeRuntime Include Kotlin runtime in to resulting .jar + -noJdk Don't include Java runtime into classpath + -noStdlib Don't include Kotlin runtime into classpath + -noJdkAnnotations Don't include JDK external annotations into classpath + -notNullAssertions Generate not-null assertion after each invocation of method returning not-null + -notNullParamAssertions Generate not-null assertions on parameters of methods accessible from Java + -module Path to the module file to compile + -script Evaluate the script file + -kotlinHome Path to Kotlin compiler home directory, used for annotations and runtime libraries discovery + -inline {on,off} Inlining mode (default is on) + -tags Demarcate each compilation message (error, warning, etc) with an open and close tag + -verbose Enable verbose logging output + -version Display compiler version + -help (-h) Print a synopsis of standard options + -suppress warnings Suppress all compiler warnings + -printArgs Print command line arguments OK \ No newline at end of file diff --git a/compiler/testData/cli/jvm/inline/off.out b/compiler/testData/cli/jvm/inline/off.out index e1b9c316922..93f42398265 100644 --- a/compiler/testData/cli/jvm/inline/off.out +++ b/compiler/testData/cli/jvm/inline/off.out @@ -1,23 +1,24 @@ -Usage: org.jetbrains.jet.cli.common.arguments.K2JVMCompilerArguments - -src [String] Source file or directory (allows many paths separated by the system path separator) - -jar [String] Resulting .jar file path - -output [String] Output directory path for .class files - -classpath [String] Paths where to find user class files - -annotations [String] Paths to external annotations - -includeRuntime [flag] Include Kotlin runtime in to resulting .jar - -noJdk [flag] Don't include Java runtime into classpath - -noStdlib [flag] Don't include Kotlin runtime into classpath - -noJdkAnnotations [flag] Don't include JDK external annotations into classpath - -notNullAssertions [flag] Generate not-null assertion after each invocation of method returning not-null - -notNullParamAssertions [flag] Generate not-null assertions on parameters of methods accessible from Java - -module [String] Path to the module file to compile - -script [flag] Evaluate the script file - -kotlinHome [String] Path to Kotlin compiler home directory, used for annotations and runtime libraries discovery - -inline [String] Inlining mode: on/off (default is on) - -tags [flag] Demarcate each compilation message (error, warning, etc) with an open and close tag - -verbose [flag] Enable verbose logging output - -version [flag] Display compiler version - -help (-h) [flag] Print a synopsis of standard options - -suppress [String] Suppress compiler messages by severity (warnings) - -printArgs [flag] Print command line arguments +Usage: kotlinc-jvm +where possible options include: + -src Source file or directory (allows many paths separated by the system path separator) + -jar Resulting .jar file path + -output Output directory path for .class files + -classpath Paths where to find user class files + -annotations Paths to external annotations + -includeRuntime Include Kotlin runtime in to resulting .jar + -noJdk Don't include Java runtime into classpath + -noStdlib Don't include Kotlin runtime into classpath + -noJdkAnnotations Don't include JDK external annotations into classpath + -notNullAssertions Generate not-null assertion after each invocation of method returning not-null + -notNullParamAssertions Generate not-null assertions on parameters of methods accessible from Java + -module Path to the module file to compile + -script Evaluate the script file + -kotlinHome Path to Kotlin compiler home directory, used for annotations and runtime libraries discovery + -inline {on,off} Inlining mode (default is on) + -tags Demarcate each compilation message (error, warning, etc) with an open and close tag + -verbose Enable verbose logging output + -version Display compiler version + -help (-h) Print a synopsis of standard options + -suppress warnings Suppress all compiler warnings + -printArgs Print command line arguments OK \ No newline at end of file diff --git a/compiler/testData/cli/jvm/inline/on.out b/compiler/testData/cli/jvm/inline/on.out index e1b9c316922..93f42398265 100644 --- a/compiler/testData/cli/jvm/inline/on.out +++ b/compiler/testData/cli/jvm/inline/on.out @@ -1,23 +1,24 @@ -Usage: org.jetbrains.jet.cli.common.arguments.K2JVMCompilerArguments - -src [String] Source file or directory (allows many paths separated by the system path separator) - -jar [String] Resulting .jar file path - -output [String] Output directory path for .class files - -classpath [String] Paths where to find user class files - -annotations [String] Paths to external annotations - -includeRuntime [flag] Include Kotlin runtime in to resulting .jar - -noJdk [flag] Don't include Java runtime into classpath - -noStdlib [flag] Don't include Kotlin runtime into classpath - -noJdkAnnotations [flag] Don't include JDK external annotations into classpath - -notNullAssertions [flag] Generate not-null assertion after each invocation of method returning not-null - -notNullParamAssertions [flag] Generate not-null assertions on parameters of methods accessible from Java - -module [String] Path to the module file to compile - -script [flag] Evaluate the script file - -kotlinHome [String] Path to Kotlin compiler home directory, used for annotations and runtime libraries discovery - -inline [String] Inlining mode: on/off (default is on) - -tags [flag] Demarcate each compilation message (error, warning, etc) with an open and close tag - -verbose [flag] Enable verbose logging output - -version [flag] Display compiler version - -help (-h) [flag] Print a synopsis of standard options - -suppress [String] Suppress compiler messages by severity (warnings) - -printArgs [flag] Print command line arguments +Usage: kotlinc-jvm +where possible options include: + -src Source file or directory (allows many paths separated by the system path separator) + -jar Resulting .jar file path + -output Output directory path for .class files + -classpath Paths where to find user class files + -annotations Paths to external annotations + -includeRuntime Include Kotlin runtime in to resulting .jar + -noJdk Don't include Java runtime into classpath + -noStdlib Don't include Kotlin runtime into classpath + -noJdkAnnotations Don't include JDK external annotations into classpath + -notNullAssertions Generate not-null assertion after each invocation of method returning not-null + -notNullParamAssertions Generate not-null assertions on parameters of methods accessible from Java + -module Path to the module file to compile + -script Evaluate the script file + -kotlinHome Path to Kotlin compiler home directory, used for annotations and runtime libraries discovery + -inline {on,off} Inlining mode (default is on) + -tags Demarcate each compilation message (error, warning, etc) with an open and close tag + -verbose Enable verbose logging output + -version Display compiler version + -help (-h) Print a synopsis of standard options + -suppress warnings Suppress all compiler warnings + -printArgs Print command line arguments OK \ No newline at end of file diff --git a/compiler/testData/cli/jvm/inline/wrong.out b/compiler/testData/cli/jvm/inline/wrong.out index 5a8e2d2e7e4..b00f6dc45ea 100644 --- a/compiler/testData/cli/jvm/inline/wrong.out +++ b/compiler/testData/cli/jvm/inline/wrong.out @@ -1,24 +1,25 @@ Wrong value for inline option: 'wrong'. Should be 'on'/'off' or 'true'/'false' -Usage: org.jetbrains.jet.cli.common.arguments.K2JVMCompilerArguments - -src [String] Source file or directory (allows many paths separated by the system path separator) - -jar [String] Resulting .jar file path - -output [String] Output directory path for .class files - -classpath [String] Paths where to find user class files - -annotations [String] Paths to external annotations - -includeRuntime [flag] Include Kotlin runtime in to resulting .jar - -noJdk [flag] Don't include Java runtime into classpath - -noStdlib [flag] Don't include Kotlin runtime into classpath - -noJdkAnnotations [flag] Don't include JDK external annotations into classpath - -notNullAssertions [flag] Generate not-null assertion after each invocation of method returning not-null - -notNullParamAssertions [flag] Generate not-null assertions on parameters of methods accessible from Java - -module [String] Path to the module file to compile - -script [flag] Evaluate the script file - -kotlinHome [String] Path to Kotlin compiler home directory, used for annotations and runtime libraries discovery - -inline [String] Inlining mode: on/off (default is on) - -tags [flag] Demarcate each compilation message (error, warning, etc) with an open and close tag - -verbose [flag] Enable verbose logging output - -version [flag] Display compiler version - -help (-h) [flag] Print a synopsis of standard options - -suppress [String] Suppress compiler messages by severity (warnings) - -printArgs [flag] Print command line arguments +Usage: kotlinc-jvm +where possible options include: + -src Source file or directory (allows many paths separated by the system path separator) + -jar Resulting .jar file path + -output Output directory path for .class files + -classpath Paths where to find user class files + -annotations Paths to external annotations + -includeRuntime Include Kotlin runtime in to resulting .jar + -noJdk Don't include Java runtime into classpath + -noStdlib Don't include Kotlin runtime into classpath + -noJdkAnnotations Don't include JDK external annotations into classpath + -notNullAssertions Generate not-null assertion after each invocation of method returning not-null + -notNullParamAssertions Generate not-null assertions on parameters of methods accessible from Java + -module Path to the module file to compile + -script Evaluate the script file + -kotlinHome Path to Kotlin compiler home directory, used for annotations and runtime libraries discovery + -inline {on,off} Inlining mode (default is on) + -tags Demarcate each compilation message (error, warning, etc) with an open and close tag + -verbose Enable verbose logging output + -version Display compiler version + -help (-h) Print a synopsis of standard options + -suppress warnings Suppress all compiler warnings + -printArgs Print command line arguments INTERNAL_ERROR \ No newline at end of file diff --git a/compiler/testData/cli/jvm/wrongArgument.out b/compiler/testData/cli/jvm/wrongArgument.out index c8be2fd1b49..00e67039de6 100644 --- a/compiler/testData/cli/jvm/wrongArgument.out +++ b/compiler/testData/cli/jvm/wrongArgument.out @@ -1,24 +1,25 @@ Invalid argument: -wrongArgument -Usage: org.jetbrains.jet.cli.common.arguments.K2JVMCompilerArguments - -src [String] Source file or directory (allows many paths separated by the system path separator) - -jar [String] Resulting .jar file path - -output [String] Output directory path for .class files - -classpath [String] Paths where to find user class files - -annotations [String] Paths to external annotations - -includeRuntime [flag] Include Kotlin runtime in to resulting .jar - -noJdk [flag] Don't include Java runtime into classpath - -noStdlib [flag] Don't include Kotlin runtime into classpath - -noJdkAnnotations [flag] Don't include JDK external annotations into classpath - -notNullAssertions [flag] Generate not-null assertion after each invocation of method returning not-null - -notNullParamAssertions [flag] Generate not-null assertions on parameters of methods accessible from Java - -module [String] Path to the module file to compile - -script [flag] Evaluate the script file - -kotlinHome [String] Path to Kotlin compiler home directory, used for annotations and runtime libraries discovery - -inline [String] Inlining mode: on/off (default is on) - -tags [flag] Demarcate each compilation message (error, warning, etc) with an open and close tag - -verbose [flag] Enable verbose logging output - -version [flag] Display compiler version - -help (-h) [flag] Print a synopsis of standard options - -suppress [String] Suppress compiler messages by severity (warnings) - -printArgs [flag] Print command line arguments +Usage: kotlinc-jvm +where possible options include: + -src Source file or directory (allows many paths separated by the system path separator) + -jar Resulting .jar file path + -output Output directory path for .class files + -classpath Paths where to find user class files + -annotations Paths to external annotations + -includeRuntime Include Kotlin runtime in to resulting .jar + -noJdk Don't include Java runtime into classpath + -noStdlib Don't include Kotlin runtime into classpath + -noJdkAnnotations Don't include JDK external annotations into classpath + -notNullAssertions Generate not-null assertion after each invocation of method returning not-null + -notNullParamAssertions Generate not-null assertions on parameters of methods accessible from Java + -module Path to the module file to compile + -script Evaluate the script file + -kotlinHome Path to Kotlin compiler home directory, used for annotations and runtime libraries discovery + -inline {on,off} Inlining mode (default is on) + -tags Demarcate each compilation message (error, warning, etc) with an open and close tag + -verbose Enable verbose logging output + -version Display compiler version + -help (-h) Print a synopsis of standard options + -suppress warnings Suppress all compiler warnings + -printArgs Print command line arguments INTERNAL_ERROR \ No newline at end of file