From 14d3667a8eb87435dc1924b1ccfffbdcda5fe1bb Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Wed, 2 Dec 2020 13:19:37 +0300 Subject: [PATCH] [FE] Drop `coroutinesState` from build configurations plugins Original commit: df3b12e13bc878541b7919bf5f5958d193ad4535 --- .../kotlin/config/KotlinFacetSettings.kt | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/jps/jps-common/src/org/jetbrains/kotlin/config/KotlinFacetSettings.kt b/jps/jps-common/src/org/jetbrains/kotlin/config/KotlinFacetSettings.kt index a7936542f98..6360f251c18 100644 --- a/jps/jps-common/src/org/jetbrains/kotlin/config/KotlinFacetSettings.kt +++ b/jps/jps-common/src/org/jetbrains/kotlin/config/KotlinFacetSettings.kt @@ -48,29 +48,6 @@ sealed class TargetPlatformKind( ) } -object CoroutineSupport { - @JvmStatic - fun byCompilerArguments(arguments: CommonCompilerArguments?): LanguageFeature.State = - byCompilerArgumentsOrNull(arguments) ?: LanguageFeature.Coroutines.defaultState - - fun byCompilerArgumentsOrNull(arguments: CommonCompilerArguments?): LanguageFeature.State? = when (arguments?.coroutinesState) { - CommonCompilerArguments.ENABLE -> LanguageFeature.State.ENABLED - CommonCompilerArguments.WARN, CommonCompilerArguments.DEFAULT -> LanguageFeature.State.ENABLED_WITH_WARNING - CommonCompilerArguments.ERROR -> LanguageFeature.State.ENABLED_WITH_ERROR - else -> null - } - - fun byCompilerArgument(argument: String): LanguageFeature.State = - LanguageFeature.State.values().find { getCompilerArgument(it).equals(argument, ignoreCase = true) } - ?: LanguageFeature.Coroutines.defaultState - - fun getCompilerArgument(state: LanguageFeature.State): String = when (state) { - LanguageFeature.State.ENABLED -> "enable" - LanguageFeature.State.ENABLED_WITH_WARNING -> "warn" - LanguageFeature.State.ENABLED_WITH_ERROR, LanguageFeature.State.DISABLED -> "error" - } -} - sealed class VersionView : DescriptionAware { abstract val version: LanguageVersion