[K/JS] Remove an internal system property and replace it with the new compiler flag
This commit is contained in:
@@ -68,15 +68,10 @@ class AnalysisHandlerExtensionTest : TestCaseWithTmpdir() {
|
||||
val plugin = writePlugin(klass)
|
||||
val args = listOf("-Xplugin=$plugin", mainKt.absolutePath)
|
||||
val outputPath = if (compiler is K2JSCompiler)
|
||||
listOf("-Xuse-deprecated-legacy-compiler", "-output", tmpdir.resolve("out.js").absolutePath)
|
||||
listOf("-Xforce-deprecated-legacy-compiler-usage", "-output", tmpdir.resolve("out.js").absolutePath)
|
||||
else
|
||||
listOf("-d", tmpdir.resolve("out").absolutePath)
|
||||
|
||||
if (compiler is K2JSCompiler) {
|
||||
// TODO: It will be deleted after all of our internal vendors will use the new Kotlin/JS compiler
|
||||
CompilerSystemProperties.KOTLIN_JS_COMPILER_LEGACY_FORCE_ENABLED.value = "true"
|
||||
}
|
||||
|
||||
val (output, exitCode) = CompilerTestUtil.executeCompiler(compiler, args + outputPath + extras)
|
||||
assertEquals(expectedExitCode, exitCode, output)
|
||||
}
|
||||
|
||||
@@ -144,10 +144,7 @@ class LauncherScriptTest : TestCaseWithTmpdir() {
|
||||
"kotlinc-js",
|
||||
"$testDataDirectory/emptyMain.kt",
|
||||
"-nowarn",
|
||||
"-Xlegacy-deprecated-no-warn",
|
||||
"-Xuse-deprecated-legacy-compiler",
|
||||
// TODO: It will be deleted after all of our internal vendors will use the new Kotlin/JS compiler
|
||||
"-D${CompilerSystemProperties.KOTLIN_JS_COMPILER_LEGACY_FORCE_ENABLED.property}=true",
|
||||
"-Xforce-deprecated-legacy-compiler-usage",
|
||||
"-output",
|
||||
File(tmpdir, "out.js").path,
|
||||
environment = mapOf("JAVA_HOME" to KtTestUtil.getJdk8Home().absolutePath)
|
||||
|
||||
+1
-6
@@ -132,17 +132,12 @@ class CompileKotlinAgainstCustomBinariesTest : AbstractKotlinCompilerIntegration
|
||||
when (compiler) {
|
||||
is K2JSCompiler -> compileJsLibrary(
|
||||
libraryName,
|
||||
additionalOptions = libraryOptions + "-Xlegacy-deprecated-no-warn" + "-Xuse-deprecated-legacy-compiler"
|
||||
additionalOptions = libraryOptions + "-Xforce-deprecated-legacy-compiler-usage"
|
||||
)
|
||||
is K2JVMCompiler -> compileLibrary(libraryName, additionalOptions = libraryOptions)
|
||||
else -> throw UnsupportedOperationException(compiler.toString())
|
||||
}
|
||||
|
||||
if (compiler is K2JSCompiler) {
|
||||
// TODO: It will be deleted after all of our internal vendors will use the new Kotlin/JS compiler
|
||||
CompilerSystemProperties.KOTLIN_JS_COMPILER_LEGACY_FORCE_ENABLED.value = "true"
|
||||
}
|
||||
|
||||
compileKotlin(
|
||||
"source.kt", usageDestination, listOf(result), compiler,
|
||||
additionalOptions.toList() + listOf("-language-version", LanguageVersion.LATEST_STABLE.versionString)
|
||||
|
||||
+1
-3
@@ -66,9 +66,7 @@ abstract class AbstractMultiPlatformIntegrationTest : KtUsefulTestCase() {
|
||||
if (jsSrc != null) {
|
||||
appendLine()
|
||||
appendLine("-- JS --")
|
||||
// TODO: It will be deleted after all of our internal vendors will use the new Kotlin/JS compiler
|
||||
CompilerSystemProperties.KOTLIN_JS_COMPILER_LEGACY_FORCE_ENABLED.value = "true"
|
||||
appendLine(K2JSCompiler().compile(jsSrc, commonSrc, "-Xuse-deprecated-legacy-compiler", "-output", jsDest!!))
|
||||
appendLine(K2JSCompiler().compile(jsSrc, commonSrc, "-Xforce-deprecated-legacy-compiler-usage", "-output", jsDest!!))
|
||||
}
|
||||
|
||||
if (common2Src != null) {
|
||||
|
||||
Reference in New Issue
Block a user