From 94faa759cbc65700b7b2a3da5635e012eaa1e669 Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Fri, 17 Feb 2023 13:32:01 +0200 Subject: [PATCH] [CLI] Rename -XdependsOn flag to -Xdepends-on to keep convention ^KT-56209 --- .../kotlin/cli/common/arguments/CommonCompilerArguments.kt | 2 +- .../cli/src/org/jetbrains/kotlin/cli/common/arguments.kt | 6 +++--- compiler/testData/cli/js/jsExtraHelp.out | 2 +- compiler/testData/cli/js/successfulHmpp.args | 4 ++-- compiler/testData/cli/jvm/extraHelp.out | 2 +- compiler/testData/cli/jvm/hmpp/cycleInDependencies.args | 6 +++--- compiler/testData/cli/jvm/hmpp/dependsOnSingleModule.args | 2 +- compiler/testData/cli/jvm/hmpp/dependsOnSingleModule.out | 2 +- compiler/testData/cli/jvm/hmpp/dependsOnWithoutModules.args | 2 +- compiler/testData/cli/jvm/hmpp/dependsOnWithoutModules.out | 2 +- compiler/testData/cli/jvm/hmpp/missingModule.args | 2 +- compiler/testData/cli/jvm/hmpp/successfulCompilation.args | 4 ++-- compiler/testData/cli/metadata/successfulHmpp.args | 4 ++-- 13 files changed, 20 insertions(+), 20 deletions(-) diff --git a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.kt b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.kt index bd0cfa9ced3..7f49eeac1f2 100644 --- a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.kt +++ b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.kt @@ -729,7 +729,7 @@ abstract class CommonCompilerArguments : CommonToolArguments() { } @Argument( - value = "-XdependsOn", + value = "-Xdepends-on", valueDescription = ":", description = "Declares that depends on with dependsOn relation", delimiter = "" diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/common/arguments.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/common/arguments.kt index dfcbdd91b0e..171ed7bba02 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/common/arguments.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/common/arguments.kt @@ -145,7 +145,7 @@ private fun CompilerConfiguration.buildHmppModuleStructure(arguments: CommonComp if (rawModules == null) { if (rawDependencies != null) { - reportError("-XdependsOn flag can not be used without -Xmodule") + reportError("-Xdepends-on flag can not be used without -Xmodule") } return null } @@ -207,7 +207,7 @@ private fun CompilerConfiguration.buildHmppModuleStructure(arguments: CommonComp if (modules.size == 1) { if (rawDependencies?.isNotEmpty() == true) { - reportError("-XdependsOn flag is specified but there is only one module declared") + reportError("-Xdepends-on flag is specified but there is only one module declared") } return HmppCliModuleStructure(modules, emptyMap()) } @@ -224,7 +224,7 @@ private fun CompilerConfiguration.buildHmppModuleStructure(arguments: CommonComp val dependenciesMap = rawDependencies.orEmpty().mapNotNull { val split = it.split(":") if (split.size != 2) { - reportError("Incorrect syntax for -XdependsOn argument. Expected : but got `$it`") + reportError("Incorrect syntax for -Xdepends-on argument. Expected : but got `$it`") return@mapNotNull null } val moduleName1 = split[0] diff --git a/compiler/testData/cli/js/jsExtraHelp.out b/compiler/testData/cli/js/jsExtraHelp.out index a9e2ea24b55..08e3c2c7d6f 100644 --- a/compiler/testData/cli/js/jsExtraHelp.out +++ b/compiler/testData/cli/js/jsExtraHelp.out @@ -63,7 +63,7 @@ where advanced options include: -Xcommon-sources= Sources of the common module that need to be compiled together with this module in the multi-platform mode. Should be a subset of sources passed as free arguments -Xcontext-receivers Enable experimental context receivers - -XdependsOn=: + -Xdepends-on=: Declares that depends on with dependsOn relation -Xdisable-default-scripting-plugin Do not enable scripting plugin by default diff --git a/compiler/testData/cli/js/successfulHmpp.args b/compiler/testData/cli/js/successfulHmpp.args index 49ebe847950..4b87e05d149 100644 --- a/compiler/testData/cli/js/successfulHmpp.args +++ b/compiler/testData/cli/js/successfulHmpp.args @@ -11,5 +11,5 @@ fir-hmpp -Xmodule=a;$TESTDATA_DIR$/../jvm/hmpp/src/a.kt -Xmodule=b;$TESTDATA_DIR$/../jvm/hmpp/src/b.kt -Xmodule=c;$TESTDATA_DIR$/../jvm/hmpp/src/c.kt --XdependsOn=b\:a --XdependsOn=c\:b +-Xdepends-on=b\:a +-Xdepends-on=c\:b diff --git a/compiler/testData/cli/jvm/extraHelp.out b/compiler/testData/cli/jvm/extraHelp.out index ce62ef2250b..57bfbb0450d 100644 --- a/compiler/testData/cli/jvm/extraHelp.out +++ b/compiler/testData/cli/jvm/extraHelp.out @@ -169,7 +169,7 @@ where advanced options include: -Xcommon-sources= Sources of the common module that need to be compiled together with this module in the multi-platform mode. Should be a subset of sources passed as free arguments -Xcontext-receivers Enable experimental context receivers - -XdependsOn=: + -Xdepends-on=: Declares that depends on with dependsOn relation -Xdisable-default-scripting-plugin Do not enable scripting plugin by default diff --git a/compiler/testData/cli/jvm/hmpp/cycleInDependencies.args b/compiler/testData/cli/jvm/hmpp/cycleInDependencies.args index 35b7e0d462a..c8e6d791700 100644 --- a/compiler/testData/cli/jvm/hmpp/cycleInDependencies.args +++ b/compiler/testData/cli/jvm/hmpp/cycleInDependencies.args @@ -9,6 +9,6 @@ $TEMP_DIR$ -Xmodule=a;$TESTDATA_DIR$/src/a.kt -Xmodule=b;$TESTDATA_DIR$/src/b.kt -Xmodule=c;$TESTDATA_DIR$/src/c.kt --XdependsOn=b\:a --XdependsOn=c\:b --XdependsOn=a\:c +-Xdepends-on=b\:a +-Xdepends-on=c\:b +-Xdepends-on=a\:c diff --git a/compiler/testData/cli/jvm/hmpp/dependsOnSingleModule.args b/compiler/testData/cli/jvm/hmpp/dependsOnSingleModule.args index 1db4f0760ae..f9728c7f9f4 100644 --- a/compiler/testData/cli/jvm/hmpp/dependsOnSingleModule.args +++ b/compiler/testData/cli/jvm/hmpp/dependsOnSingleModule.args @@ -5,4 +5,4 @@ $TEMP_DIR$ 2.0 -XXLanguage\:+MultiPlatformProjects -Xmodule=a;$TESTDATA_DIR$/src/a.kt --XdependsOn=b\:a +-Xdepends-on=b\:a diff --git a/compiler/testData/cli/jvm/hmpp/dependsOnSingleModule.out b/compiler/testData/cli/jvm/hmpp/dependsOnSingleModule.out index ad55c04fb66..edd058e2761 100644 --- a/compiler/testData/cli/jvm/hmpp/dependsOnSingleModule.out +++ b/compiler/testData/cli/jvm/hmpp/dependsOnSingleModule.out @@ -8,5 +8,5 @@ as no stability/compatibility guarantees are given on compiler or generated code. Use it at your own risk! warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features -error: -XdependsOn flag is specified but there is only one module declared +error: -Xdepends-on flag is specified but there is only one module declared COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/hmpp/dependsOnWithoutModules.args b/compiler/testData/cli/jvm/hmpp/dependsOnWithoutModules.args index 351e97737f7..3522423d1a1 100644 --- a/compiler/testData/cli/jvm/hmpp/dependsOnWithoutModules.args +++ b/compiler/testData/cli/jvm/hmpp/dependsOnWithoutModules.args @@ -4,4 +4,4 @@ $TEMP_DIR$ -language-version 2.0 -XXLanguage\:+MultiPlatformProjects --XdependsOn=a\:b +-Xdepends-on=a\:b diff --git a/compiler/testData/cli/jvm/hmpp/dependsOnWithoutModules.out b/compiler/testData/cli/jvm/hmpp/dependsOnWithoutModules.out index 642a8c0abd8..3d251418760 100644 --- a/compiler/testData/cli/jvm/hmpp/dependsOnWithoutModules.out +++ b/compiler/testData/cli/jvm/hmpp/dependsOnWithoutModules.out @@ -8,5 +8,5 @@ as no stability/compatibility guarantees are given on compiler or generated code. Use it at your own risk! warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features -error: -XdependsOn flag can not be used without -Xmodule +error: -Xdepends-on flag can not be used without -Xmodule COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/hmpp/missingModule.args b/compiler/testData/cli/jvm/hmpp/missingModule.args index d8134152595..1fadb859f92 100644 --- a/compiler/testData/cli/jvm/hmpp/missingModule.args +++ b/compiler/testData/cli/jvm/hmpp/missingModule.args @@ -7,4 +7,4 @@ $TEMP_DIR$ -XXLanguage\:+MultiPlatformProjects -Xmodule=a;$TESTDATA_DIR$/src/a.kt -Xmodule=b;$TESTDATA_DIR$/src/b.kt --XdependsOn=c\:a +-Xdepends-on=c\:a diff --git a/compiler/testData/cli/jvm/hmpp/successfulCompilation.args b/compiler/testData/cli/jvm/hmpp/successfulCompilation.args index 2f85029e0e6..8ce9cac14e2 100644 --- a/compiler/testData/cli/jvm/hmpp/successfulCompilation.args +++ b/compiler/testData/cli/jvm/hmpp/successfulCompilation.args @@ -9,5 +9,5 @@ $TEMP_DIR$ -Xmodule=a;$TESTDATA_DIR$/src/a.kt -Xmodule=b;$TESTDATA_DIR$/src/b.kt -Xmodule=c;$TESTDATA_DIR$/src/c.kt --XdependsOn=b\:a --XdependsOn=c\:b +-Xdepends-on=b\:a +-Xdepends-on=c\:b diff --git a/compiler/testData/cli/metadata/successfulHmpp.args b/compiler/testData/cli/metadata/successfulHmpp.args index a7abbafbb0c..119a8de1afe 100644 --- a/compiler/testData/cli/metadata/successfulHmpp.args +++ b/compiler/testData/cli/metadata/successfulHmpp.args @@ -9,5 +9,5 @@ $TEMP_DIR$ -Xmodule=a;$TESTDATA_DIR$/../jvm/hmpp/src/a.kt -Xmodule=b;$TESTDATA_DIR$/../jvm/hmpp/src/b.kt -Xmodule=c;$TESTDATA_DIR$/../jvm/hmpp/src/c.kt --XdependsOn=b\:a --XdependsOn=c\:b +-Xdepends-on=b\:a +-Xdepends-on=c\:b