[K/JS] Remove an internal system property and replace it with the new compiler flag
This commit is contained in:
@@ -185,29 +185,12 @@ public class K2JSCompiler extends CLICompiler<K2JSCompilerArguments> {
|
||||
}
|
||||
|
||||
LanguageVersionSettings languageVersionSettings = CommonConfigurationKeysKt.getLanguageVersionSettings(configuration);
|
||||
if (!Objects.equals(CompilerSystemProperties.KOTLIN_JS_COMPILER_LEGACY_FORCE_ENABLED.getValue(), "true") && languageVersionSettings.getLanguageVersion().compareTo(LanguageVersion.KOTLIN_1_9) >= 0) {
|
||||
|
||||
if (!arguments.getForceDeprecatedLegacyCompilerUsage() && 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;
|
||||
}
|
||||
|
||||
String deprecatedMessage = "==========\n" +
|
||||
"This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.\n" +
|
||||
"\n" +
|
||||
"Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).\n" +
|
||||
"Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.\n" +
|
||||
"\n" +
|
||||
"You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.\n" +
|
||||
"==========";
|
||||
|
||||
if (!arguments.getUseDeprecatedLegacyCompiler()) {
|
||||
messageCollector.report(ERROR, deprecatedMessage, null);
|
||||
return COMPILATION_ERROR;
|
||||
}
|
||||
|
||||
if (!arguments.getLegacyDeprecatedNoWarn()) {
|
||||
messageCollector.report(STRONG_WARNING, deprecatedMessage, null);
|
||||
}
|
||||
|
||||
if (arguments.getFreeArgs().isEmpty() && (!incrementalCompilationIsEnabledForJs(arguments))) {
|
||||
if (arguments.getVersion()) {
|
||||
return OK;
|
||||
|
||||
Reference in New Issue
Block a user