[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
@@ -18,6 +18,7 @@ package org.jetbrains.kotlin.cli
import com.intellij.openapi.util.SystemInfo
import com.intellij.openapi.util.text.StringUtil
import org.jetbrains.kotlin.cli.common.CompilerSystemProperties
import org.jetbrains.kotlin.cli.common.ExitCode
import org.jetbrains.kotlin.cli.jvm.K2JVMCompiler
import org.jetbrains.kotlin.test.KotlinTestUtils
@@ -142,7 +143,12 @@ class LauncherScriptTest : TestCaseWithTmpdir() {
runProcess(
"kotlinc-js",
"$testDataDirectory/emptyMain.kt",
"-Xlegacy-deprecated-no-warn", "-Xuse-deprecated-legacy-compiler", "-output", File(tmpdir, "out.js").path
"-nowarn",
"-Xlegacy-deprecated-no-warn",
"-Xuse-deprecated-legacy-compiler",
"-D${CompilerSystemProperties.KOTLIN_JS_COMPILER_LEGACY_FORCE_ENABLED.property}=true",
"-output",
File(tmpdir, "out.js").path,
)
}