From 37b95972dbb2689a0bd8934dd564fde601339e1a Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Thu, 21 Oct 2021 12:55:11 +0300 Subject: [PATCH] Uncomment warning about -Xopt-in deprecation --- .../kotlin/cli/common/arguments/CommonCompilerArguments.kt | 7 +++---- .../testData/cli/jvm/experimentalDeprecatedWarning.out | 1 + .../testData/cli/jvm/unrestrictedBuilderInference.args | 2 +- kotlin-native/backend.native/tests/build.gradle | 2 +- 4 files changed, 6 insertions(+), 6 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 97a98b5bfc3..9f26f8e7447 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 @@ -389,10 +389,9 @@ abstract class CommonCompilerArguments : CommonToolArguments() { } val optInDeprecatedFqNames = optInDeprecated?.toList().orEmpty() if (optInDeprecatedFqNames.isNotEmpty()) { - // TODO: uncomment this after -opt-in bootstrapping and Gradle script fixing -// collector.report( -// WARNING, "'-Xopt-in' is deprecated and will be removed in a future release, please use -opt-in instead" -// ) + collector.report( + WARNING, "'-Xopt-in' is deprecated and will be removed in a future release, please use -opt-in instead" + ) } put(AnalysisFlags.optIn, useExperimentalFqNames + optInDeprecatedFqNames + optIn?.toList().orEmpty()) put(AnalysisFlags.expectActualLinker, expectActualLinker) diff --git a/compiler/testData/cli/jvm/experimentalDeprecatedWarning.out b/compiler/testData/cli/jvm/experimentalDeprecatedWarning.out index 4cadf29b828..65c806d1e57 100644 --- a/compiler/testData/cli/jvm/experimentalDeprecatedWarning.out +++ b/compiler/testData/cli/jvm/experimentalDeprecatedWarning.out @@ -1,3 +1,4 @@ warning: '-Xuse-experimental' is deprecated and will be removed in a future release, please use -opt-in instead +warning: '-Xopt-in' is deprecated and will be removed in a future release, please use -opt-in instead warning: opt-in requirement marker org.test.Warning is deprecated. Warning OK diff --git a/compiler/testData/cli/jvm/unrestrictedBuilderInference.args b/compiler/testData/cli/jvm/unrestrictedBuilderInference.args index 4bea4537a9d..2adf22e13a0 100644 --- a/compiler/testData/cli/jvm/unrestrictedBuilderInference.args +++ b/compiler/testData/cli/jvm/unrestrictedBuilderInference.args @@ -2,4 +2,4 @@ $TESTDATA_DIR$/unrestrictedBuilderInference.kt -d $TEMP_DIR$ -Xunrestricted-builder-inference --Xopt-in=kotlin.RequiresOptIn +-opt-in=kotlin.RequiresOptIn diff --git a/kotlin-native/backend.native/tests/build.gradle b/kotlin-native/backend.native/tests/build.gradle index e691ca1d4f2..6c42a091a7e 100644 --- a/kotlin-native/backend.native/tests/build.gradle +++ b/kotlin-native/backend.native/tests/build.gradle @@ -1646,7 +1646,7 @@ linkTest("initializers_sharedVarInInitBlock") { standaloneTest("initializers_static") { source = "codegen/initializers/static.kt" - flags = ['-Xopt-in=kotlin.native.internal.InternalForKotlinNative', "-tr"] + flags = ['-opt-in=kotlin.native.internal.InternalForKotlinNative', "-tr"] } task arithmetic_basic(type: KonanLocalTest) {