[K/JS] Remove an internal system property and replace it with the new compiler flag

This commit is contained in:
Artem Kobzar
2023-03-17 12:38:34 +00:00
committed by Space Team
parent ca2492e1f8
commit 4da81b2b6e
164 changed files with 100 additions and 566 deletions
@@ -293,20 +293,13 @@ public abstract class AbstractCliTest extends TestCaseWithTmpdir {
}
protected void doJsTest(@NotNull String fileName) {
setupOldJsCompiler(fileName);
doTest(fileName, new K2JSCompiler());
}
protected void doJsDceTest(@NotNull String fileName) {
setupOldJsCompiler(fileName);
doTest(fileName, new K2JSDce());
}
private void setupOldJsCompiler(String fileName) {
if (fileName == null) return;
CompilerSystemProperties.KOTLIN_JS_COMPILER_LEGACY_FORCE_ENABLED.setValue(Boolean.toString(!fileName.contains("_strict")));
}
protected void doMetadataTest(@NotNull String fileName) {
doTest(fileName, new K2MetadataCompiler());
}
@@ -40,7 +40,6 @@ public abstract class AbstractAntTaskTest extends KotlinIntegrationTestBase {
testDataDir,
"build.log",
"-Xmx256m",
"-D" + CompilerSystemProperties.KOTLIN_JS_COMPILER_LEGACY_FORCE_ENABLED.getProperty() + "=true",
"-Dkotlin.lib=" + KotlinIntegrationTestBase.getCompilerLib(),
"-Dkotlin.runtime.jar=" + ForTestCompileRuntime.runtimeJarForTests().getAbsolutePath(),
"-Dkotlin.reflect.jar=" + ForTestCompileRuntime.reflectJarForTests().getAbsolutePath(),
@@ -163,13 +163,10 @@ abstract class AbstractKotlinCompilerIntegrationTest : TestCaseWithTmpdir() {
args.add("-libraries")
args.add(classpath.joinToString(File.pathSeparator))
}
args.add("-Xlegacy-deprecated-no-warn")
args.add("-Xuse-deprecated-legacy-compiler")
args.add("-Xforce-deprecated-legacy-compiler-usage")
args.add("-output")
args.add(output.path)
args.add("-meta-info")
// 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"
} else if (compiler is K2JVMCompiler || compiler is K2MetadataCompiler) {
if (classpath.isNotEmpty()) {
args.add("-classpath")