Drop CommonCompilerArguments.optInDeprecated
On the way to KT-22956
This commit is contained in:
+3
-17
@@ -75,8 +75,7 @@ abstract class CommonCompilerArguments : CommonToolArguments() {
|
||||
|
||||
@Argument(
|
||||
value = "-opt-in",
|
||||
// Uncomment after deletion of optInDeprecated
|
||||
// deprecatedName = "-Xopt-in",
|
||||
deprecatedName = "-Xopt-in",
|
||||
valueDescription = "<fq.name>",
|
||||
description = "Enable usages of API that requires opt-in with an opt-in requirement marker with the given fully qualified name"
|
||||
)
|
||||
@@ -166,14 +165,6 @@ abstract class CommonCompilerArguments : CommonToolArguments() {
|
||||
)
|
||||
var useExperimental: Array<String>? by FreezableVar(null)
|
||||
|
||||
// NB: we have to keep this flag for some time due to bootstrapping problems
|
||||
@Argument(
|
||||
value = "-Xopt-in",
|
||||
valueDescription = "<fq.name>",
|
||||
description = "Enable usages of API that requires opt-in with an opt-in requirement marker with the given fully qualified name"
|
||||
)
|
||||
var optInDeprecated: Array<String>? by FreezableVar(null)
|
||||
|
||||
@Argument(
|
||||
value = "-Xproper-ieee754-comparisons",
|
||||
description = "Generate proper IEEE 754 comparisons in all cases if values are statically known to be of primitive numeric types"
|
||||
@@ -410,6 +401,7 @@ abstract class CommonCompilerArguments : CommonToolArguments() {
|
||||
@Argument(value = "-Xrender-internal-diagnostic-names", description = "Render internal names of warnings and errors")
|
||||
var renderInternalDiagnosticNames: Boolean by FreezableVar(false)
|
||||
|
||||
@OptIn(IDEAPluginsCompatibilityAPI::class)
|
||||
open fun configureAnalysisFlags(collector: MessageCollector, languageVersion: LanguageVersion): MutableMap<AnalysisFlag<*>, Any> {
|
||||
return HashMap<AnalysisFlag<*>, Any>().apply {
|
||||
put(AnalysisFlags.skipMetadataVersionCheck, skipMetadataVersionCheck)
|
||||
@@ -421,13 +413,7 @@ abstract class CommonCompilerArguments : CommonToolArguments() {
|
||||
WARNING, "'-Xuse-experimental' is deprecated and will be removed in a future release, please use -opt-in instead"
|
||||
)
|
||||
}
|
||||
val optInDeprecatedFqNames = optInDeprecated?.toList().orEmpty()
|
||||
if (optInDeprecatedFqNames.isNotEmpty()) {
|
||||
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.optIn, useExperimentalFqNames + optIn?.toList().orEmpty())
|
||||
put(AnalysisFlags.expectActualLinker, expectActualLinker)
|
||||
put(AnalysisFlags.explicitApiVersion, apiVersion != null)
|
||||
put(AnalysisFlags.allowResultReturnType, allowResultReturnType)
|
||||
|
||||
-1
@@ -79,7 +79,6 @@ where advanced options include:
|
||||
-Xno-check-actual Do not check presence of 'actual' modifier in multi-platform projects
|
||||
-Xno-inline Disable method inlining
|
||||
-Xklib-normalize-absolute-path Normalize absolute paths in klibs
|
||||
-Xopt-in=<fq.name> Enable usages of API that requires opt-in with an opt-in requirement marker with the given fully qualified name
|
||||
-Xphases-to-dump Dump backend state both before and after these phases
|
||||
-Xphases-to-dump-after Dump backend state after these phases
|
||||
-Xphases-to-dump-before Dump backend state before these phases
|
||||
|
||||
@@ -4,4 +4,4 @@ $TEMP_DIR$
|
||||
-Xopt-in=kotlin.RequiresOptIn
|
||||
-opt-in=kotlin.RequiresOptIn
|
||||
-opt-in=org.test.Warning
|
||||
-Xuse-experimental=org.test.OneMore
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
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: flag is not supported by this version of the compiler: -Xopt-in=kotlin.RequiresOptIn
|
||||
warning: opt-in requirement marker org.test.Warning is deprecated. Warning
|
||||
OK
|
||||
|
||||
-1
@@ -184,7 +184,6 @@ where advanced options include:
|
||||
-Xno-check-actual Do not check presence of 'actual' modifier in multi-platform projects
|
||||
-Xno-inline Disable method inlining
|
||||
-Xklib-normalize-absolute-path Normalize absolute paths in klibs
|
||||
-Xopt-in=<fq.name> Enable usages of API that requires opt-in with an opt-in requirement marker with the given fully qualified name
|
||||
-Xphases-to-dump Dump backend state both before and after these phases
|
||||
-Xphases-to-dump-after Dump backend state after these phases
|
||||
-Xphases-to-dump-before Dump backend state before these phases
|
||||
|
||||
+1
-1
@@ -150,7 +150,7 @@ private class ExtTestDataFile(
|
||||
private fun assembleFreeCompilerArgs(): TestCompilerArgs {
|
||||
val args = mutableListOf<String>()
|
||||
testDataFileSettings.languageSettings.sorted().mapTo(args) { "-XXLanguage:$it" }
|
||||
testDataFileSettings.optInsForCompiler.sorted().mapTo(args) { "-Xopt-in=$it" }
|
||||
testDataFileSettings.optInsForCompiler.sorted().mapTo(args) { "-opt-in=$it" }
|
||||
if (testDataFileSettings.expectActualLinker) args += "-Xexpect-actual-linker"
|
||||
return TestCompilerArgs(args)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user