Drop CommonCompilerArguments.optInDeprecated

On the way to KT-22956
This commit is contained in:
Mikhail Glukhikh
2022-01-12 21:35:39 +03:00
committed by Space
parent 5798320e9e
commit eeadd8588d
6 changed files with 6 additions and 23 deletions
@@ -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)