[CLI] Drop CommonCompilerArguments.coroutinesState
This commit is contained in:
committed by
TeamCityServer
parent
df3b12e13b
commit
e991c9d476
-30
@@ -121,13 +121,6 @@ abstract class CommonCompilerArguments : CommonToolArguments() {
|
||||
)
|
||||
var intellijPluginRoot: String? by NullableStringFreezableVar(null)
|
||||
|
||||
@Argument(
|
||||
value = "-Xcoroutines",
|
||||
valueDescription = "{enable|warn|error}",
|
||||
description = "Enable coroutines or report warnings or errors on declarations and use sites of 'suspend' modifier"
|
||||
)
|
||||
var coroutinesState: String? by NullableStringFreezableVar(DEFAULT)
|
||||
|
||||
@Argument(
|
||||
value = "-Xnew-inference",
|
||||
description = "Enable new experimental generic type inference algorithm"
|
||||
@@ -385,17 +378,6 @@ abstract class CommonCompilerArguments : CommonToolArguments() {
|
||||
put(LanguageFeature.MultiPlatformProjects, LanguageFeature.State.ENABLED)
|
||||
}
|
||||
|
||||
when (coroutinesState) {
|
||||
CommonCompilerArguments.ERROR -> put(LanguageFeature.Coroutines, LanguageFeature.State.ENABLED_WITH_ERROR)
|
||||
CommonCompilerArguments.ENABLE -> put(LanguageFeature.Coroutines, LanguageFeature.State.ENABLED)
|
||||
CommonCompilerArguments.WARN, CommonCompilerArguments.DEFAULT -> {
|
||||
}
|
||||
else -> {
|
||||
val message = "Invalid value of -Xcoroutines (should be: enable, warn or error): " + coroutinesState
|
||||
collector.report(CompilerMessageSeverity.ERROR, message, null)
|
||||
}
|
||||
}
|
||||
|
||||
if (newInference) {
|
||||
put(LanguageFeature.NewInference, LanguageFeature.State.ENABLED)
|
||||
put(LanguageFeature.SamConversionPerArgument, LanguageFeature.State.ENABLED)
|
||||
@@ -525,7 +507,6 @@ abstract class CommonCompilerArguments : CommonToolArguments() {
|
||||
configureLanguageFeatures(collector)
|
||||
)
|
||||
|
||||
checkCoroutines(languageVersionSettings, collector)
|
||||
checkIrSupport(languageVersionSettings, collector)
|
||||
|
||||
return languageVersionSettings
|
||||
@@ -596,17 +577,6 @@ abstract class CommonCompilerArguments : CommonToolArguments() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun checkCoroutines(languageVersionSettings: LanguageVersionSettings, collector: MessageCollector) {
|
||||
if (languageVersionSettings.supportsFeature(LanguageFeature.ReleaseCoroutines)) {
|
||||
if (coroutinesState != DEFAULT) {
|
||||
collector.report(
|
||||
CompilerMessageSeverity.STRONG_WARNING,
|
||||
"-Xcoroutines has no effect: coroutines are enabled anyway in 1.3 and beyond"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected open fun checkIrSupport(languageVersionSettings: LanguageVersionSettings, collector: MessageCollector) {
|
||||
// backend-specific
|
||||
}
|
||||
|
||||
-2
@@ -30,8 +30,6 @@ where advanced options include:
|
||||
Run sticky condition checks on subsequent phases as well. Implies -Xcheck-phase-conditions
|
||||
-Xcommon-sources=<path> 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
|
||||
-Xcoroutines={enable|warn|error}
|
||||
Enable coroutines or report warnings or errors on declarations and use sites of 'suspend' modifier
|
||||
-Xdisable-default-scripting-plugin
|
||||
Do not enable scripting plugin by default
|
||||
-Xdisable-phases Disable backend phases
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
warning: -Xcoroutines has no effect: coroutines are enabled anyway in 1.3 and beyond
|
||||
warning: flag is not supported by this version of the compiler: -Xcoroutines=enable
|
||||
OK
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
warning: -Xcoroutines has no effect: coroutines are enabled anyway in 1.3 and beyond
|
||||
warning: flag is not supported by this version of the compiler: -Xcoroutines=error
|
||||
OK
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
warning: argument -Xcoroutines is passed multiple times. Only the last value will be used: enable
|
||||
warning: -Xcoroutines has no effect: coroutines are enabled anyway in 1.3 and beyond
|
||||
warning: flag is not supported by this version of the compiler: -Xcoroutines=error
|
||||
warning: flag is not supported by this version of the compiler: -Xcoroutines=enable
|
||||
OK
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
warning: -Xcoroutines has no effect: coroutines are enabled anyway in 1.3 and beyond
|
||||
warning: flag is not supported by this version of the compiler: -Xcoroutines=warn
|
||||
OK
|
||||
|
||||
-2
@@ -130,8 +130,6 @@ where advanced options include:
|
||||
Run sticky condition checks on subsequent phases as well. Implies -Xcheck-phase-conditions
|
||||
-Xcommon-sources=<path> 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
|
||||
-Xcoroutines={enable|warn|error}
|
||||
Enable coroutines or report warnings or errors on declarations and use sites of 'suspend' modifier
|
||||
-Xdisable-default-scripting-plugin
|
||||
Do not enable scripting plugin by default
|
||||
-Xdisable-phases Disable backend phases
|
||||
|
||||
Reference in New Issue
Block a user