Change policy with legacy compiler backend

[JS] Remove incremental js jps test

[JS] Remove test of maven js archetype

[JS] Fix another one test

[JS] Fix tests for jps

[JS] Try to fix maven test data

[JS] Fix test data

[JS] Fix test data for ant

[JS] Fix jsExtraHelp test

[JS] Fix test run from not-Gradle build tools

[JS] Set flag without compiler error

[JS] Disable warnings and errors in legacy compiler called from Gradle

[JS] Proofread messages

[JS] Not proofread messages

KT-42326
This commit is contained in:
Ilya Goncharov
2022-09-29 13:56:30 +00:00
committed by Space Team
parent a3ad0a6e88
commit c726360ad2
113 changed files with 498 additions and 745 deletions
@@ -67,7 +67,7 @@ class AnalysisHandlerExtensionTest : TestCaseWithTmpdir() {
val plugin = writePlugin(klass)
val args = listOf("-Xplugin=$plugin", mainKt.absolutePath)
val outputPath = if (compiler is K2JSCompiler)
listOf("-output", tmpdir.resolve("out.js").absolutePath)
listOf("-Xuse-deprecated-legacy-compiler", "-output", tmpdir.resolve("out.js").absolutePath)
else
listOf("-d", tmpdir.resolve("out").absolutePath)
val (output, exitCode) = CompilerTestUtil.executeCompiler(compiler, args + outputPath + extras)
@@ -141,7 +141,7 @@ class LauncherScriptTest : TestCaseWithTmpdir() {
runProcess(
"kotlinc-js",
"$testDataDirectory/emptyMain.kt",
"-Xlegacy-deprecated-no-warn", "-output", File(tmpdir, "out.js").path
"-Xlegacy-deprecated-no-warn", "-Xuse-deprecated-legacy-compiler", "-output", File(tmpdir, "out.js").path
)
}
@@ -122,7 +122,10 @@ class CompileKotlinAgainstCustomBinariesTest : AbstractKotlinCompilerIntegration
val result =
when (compiler) {
is K2JSCompiler -> compileJsLibrary(libraryName, additionalOptions = libraryOptions + "-Xlegacy-deprecated-no-warn")
is K2JSCompiler -> compileJsLibrary(
libraryName,
additionalOptions = libraryOptions + "-Xlegacy-deprecated-no-warn" + "-Xuse-deprecated-legacy-compiler"
)
is K2JVMCompiler -> compileLibrary(libraryName, additionalOptions = libraryOptions)
else -> throw UnsupportedOperationException(compiler.toString())
}
@@ -65,7 +65,7 @@ abstract class AbstractMultiPlatformIntegrationTest : KtUsefulTestCase() {
if (jsSrc != null) {
appendLine()
appendLine("-- JS --")
appendLine(K2JSCompiler().compile(jsSrc, commonSrc, "-output", jsDest!!))
appendLine(K2JSCompiler().compile(jsSrc, commonSrc, "-Xuse-deprecated-legacy-compiler", "-output", jsDest!!))
}
if (common2Src != null) {