From ca8b415726d042b19ea4762b7a65d791fbe2a2c8 Mon Sep 17 00:00:00 2001 From: Ilya Goncharov Date: Mon, 17 Oct 2022 17:59:15 +0200 Subject: [PATCH] [JS IR] Change names of ir-only arguments --- .../kotlin/cli/common/arguments/K2JSCompilerArguments.kt | 4 ++-- .../cli-js/src/org/jetbrains/kotlin/cli/js/K2JsIrCompiler.kt | 4 ++-- compiler/testData/cli/js/jsExtraHelp.out | 1 - .../kotlin/integration/JsIrAnalysisHandlerExtensionTest.kt | 4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/K2JSCompilerArguments.kt b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/K2JSCompilerArguments.kt index 774a0dedf8d..319dade07bf 100644 --- a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/K2JSCompilerArguments.kt +++ b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/K2JSCompilerArguments.kt @@ -28,14 +28,14 @@ class K2JSCompilerArguments : CommonCompilerArguments() { @Argument(value = "-output", valueDescription = "", description = "Destination *.js file for the compilation result") var outputFile: String? by NullableStringFreezableVar(null) - @Argument(value = "-Xir-output-dir", valueDescription = "", description = "Destination for generated files") + @Argument(value = "-ir-output-dir", valueDescription = "", description = "Destination for generated files") var outputDir: String? by NullableStringFreezableVar(null) @GradleOption( value = DefaultValues.StringNullDefault::class, gradleInputType = GradleInputTypes.INPUT ) - @Argument(value = "-module-name", description = "Base name of generated files") + @Argument(value = "-ir-output-name", description = "Base name of generated files") var moduleName: String? by NullableStringFreezableVar(null) @GradleOption( diff --git a/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/K2JsIrCompiler.kt b/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/K2JsIrCompiler.kt index 87192b35456..f8ea209937b 100644 --- a/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/K2JsIrCompiler.kt +++ b/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/K2JsIrCompiler.kt @@ -234,12 +234,12 @@ class K2JsIrCompiler : CLICompiler() { val outputDirPath = arguments.outputDir val outputName = arguments.moduleName if (outputDirPath == null) { - messageCollector.report(ERROR, "IR: Specify output dir via -Xir-output-dir", null) + messageCollector.report(ERROR, "IR: Specify output dir via -ir-output-dir", null) return COMPILATION_ERROR } if (outputName == null) { - messageCollector.report(ERROR, "IR: Specify output name via -Xir-module-name", null) + messageCollector.report(ERROR, "IR: Specify output name via -ir-output-name", null) return COMPILATION_ERROR } diff --git a/compiler/testData/cli/js/jsExtraHelp.out b/compiler/testData/cli/js/jsExtraHelp.out index 98e6e4399f8..78d6fbff033 100644 --- a/compiler/testData/cli/js/jsExtraHelp.out +++ b/compiler/testData/cli/js/jsExtraHelp.out @@ -38,7 +38,6 @@ where advanced options include: Enable runtime diagnostics when access safely to boolean in external declarations -Xlegacy-deprecated-no-warn Disable warnings of deprecation of legacy compiler -Xmetadata-only Generate *.meta.js and *.kjsm files only - -Xir-output-dir= Destination for generated files -Xpartial-linkage Allow unlinked symbols -Xrepositories= Paths to additional places where libraries could be found -Xstrict-implicit-export-types Generate strict types for implicitly exported entities inside d.ts files. Available in IR backend only. diff --git a/js/js.tests/test/org/jetbrains/kotlin/integration/JsIrAnalysisHandlerExtensionTest.kt b/js/js.tests/test/org/jetbrains/kotlin/integration/JsIrAnalysisHandlerExtensionTest.kt index 30a5b41b481..dac81a8be12 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/integration/JsIrAnalysisHandlerExtensionTest.kt +++ b/js/js.tests/test/org/jetbrains/kotlin/integration/JsIrAnalysisHandlerExtensionTest.kt @@ -69,8 +69,8 @@ class JsIrAnalysisHandlerExtensionTest : TestCaseWithTmpdir() { val args = listOf( "-Xplugin=$plugin", "-libraries", libs, - "-Xir-output-dir", outputFile.parentFile.path, - "-Xir-module-name", outputFile.nameWithoutExtension, + "-ir-output-dir", outputFile.parentFile.path, + "-ir-output-name", outputFile.nameWithoutExtension, mainKt.absolutePath ) CompilerTestUtil.executeCompilerAssertSuccessful(compiler, args + extras)