[K/JS] Add a secret system property to enable the old Kotlin/JS compiler only for tests until it will be removed from the sources

This commit is contained in:
Artem Kobzar
2022-12-29 13:32:01 +00:00
committed by Space Team
parent 47f32b715f
commit fbf06b5495
49 changed files with 109 additions and 16 deletions
@@ -184,7 +184,7 @@ public class K2JSCompiler extends CLICompiler<K2JSCompilerArguments> {
LanguageVersionSettings languageVersionSettings = CommonConfigurationKeysKt.getLanguageVersionSettings(configuration);
if (languageVersionSettings.getLanguageVersion().compareTo(LanguageVersion.KOTLIN_1_9) >= 0) {
if (CompilerSystemProperties.KOTLIN_JS_COMPILER_LEGACY_FORCE_ENABLED.getValue() != "true" && languageVersionSettings.getLanguageVersion().compareTo(LanguageVersion.KOTLIN_1_9) >= 0) {
messageCollector.report(ERROR, "Old Kotlin/JS compiler is no longer supported. Please migrate to the new JS IR backend", null);
return COMPILATION_ERROR;
}