[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:
@@ -55,7 +55,8 @@ enum class CompilerSystemProperties(val property: String, val alwaysDirectAccess
|
||||
USER_HOME("user.home", alwaysDirectAccess = true),
|
||||
JAVA_VERSION("java.specification.version", alwaysDirectAccess = true),
|
||||
JAVA_HOME("java.home", alwaysDirectAccess = true),
|
||||
JAVA_CLASS_PATH("java.class.path", alwaysDirectAccess = true)
|
||||
JAVA_CLASS_PATH("java.class.path", alwaysDirectAccess = true),
|
||||
KOTLIN_JS_COMPILER_LEGACY_FORCE_ENABLED("kotlin.js.compiler.legacy.force_enabled", alwaysDirectAccess = true)
|
||||
;
|
||||
|
||||
private fun <T> getProperFunction(custom: T?, default: T): T {
|
||||
|
||||
+2
-1
@@ -5,6 +5,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.cli.common.arguments
|
||||
|
||||
import org.jetbrains.kotlin.cli.common.CompilerSystemProperties
|
||||
import org.jetbrains.kotlin.cli.common.arguments.K2JsArgumentConstants.*
|
||||
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity
|
||||
import org.jetbrains.kotlin.cli.common.messages.MessageCollector
|
||||
@@ -365,7 +366,7 @@ class K2JSCompilerArguments : CommonCompilerArguments() {
|
||||
collector.deprecationWarn(irBaseClassInMetadata, false, "-Xir-base-class-in-metadata")
|
||||
collector.deprecationWarn(irNewIr2Js, true, "-Xir-new-ir2js")
|
||||
|
||||
if (languageVersion >= LanguageVersion.KOTLIN_1_9) {
|
||||
if (languageVersion >= LanguageVersion.KOTLIN_1_9 && CompilerSystemProperties.KOTLIN_JS_COMPILER_LEGACY_FORCE_ENABLED.value != "true") {
|
||||
collector.deprecationWarn(legacyDeprecatedNoWarn, false, "-Xlegacy-deprecated-no-warn")
|
||||
collector.deprecationWarn(useDeprecatedLegacyCompiler, false, "-Xuse-deprecated-legacy-compiler")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user