Do not write pre-release binaries for stable LV
This commit reverts f6571effcc and
reimplements the desired logic in another way.
In particular, we'd like these two conditions to hold:
1) only the release compiler with stable language settings (meaning,
language version is a released version of Kotlin and no experimental
features are enabled) should report errors when _reading_ pre-release
binaries.
2) the compiler should _write_ pre-release binaries only if language
settings are not stable, independent of whether the compiler itself
is release or not.
From these conditions it follows that we must use different logic to
determine how to behave when reading/writing pre-release binaries.
Namely, reading (in CompilerDeserializationConfiguration) now checks if
both the compiler is release and the language settings are stable, and
writing (in LanguageVersionSettings.isPreRelease) checks only that the
language settings are stable
This commit is contained in:
@@ -271,7 +271,7 @@ class LanguageVersionSettingsImpl @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
override fun isPreRelease(): Boolean = KotlinCompilerVersion.isPreRelease() ||
|
||||
override fun isPreRelease(): Boolean = languageVersion.isPreRelease() ||
|
||||
specificFeatures.any { (feature, state) ->
|
||||
state == LanguageFeature.State.ENABLED && feature.forcesPreReleaseBinariesIfEnabled()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user