[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
@@ -168,9 +168,7 @@ abstract class AbstractJsLookupTrackerTest : AbstractLookupTrackerTest() {
libraries = libPaths.joinToString(File.pathSeparator)
reportOutputFiles = true
freeArgs = filesToCompile.map { it.canonicalPath }
useDeprecatedLegacyCompiler = true
// 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"
forceDeprecatedLegacyCompilerUsage = true
}
configureAdditionalArgs(args)
return runJSCompiler(args, env)
@@ -37,7 +37,6 @@ abstract class BaseKotlinJpsBuildTestCase : JpsBuildTestCase() {
override fun setUp() {
super.setUp()
System.setProperty("kotlin.jps.tests", "true")
CompilerSystemProperties.KOTLIN_JS_COMPILER_LEGACY_FORCE_ENABLED.value = "true"
}
override fun shouldRunTest(): Boolean {
@@ -91,9 +91,7 @@ abstract class KotlinJpsBuildTestBase : AbstractKotlinJpsBuildTestCase() {
myProject.modules.forEach {
val facet = KotlinFacetSettings()
facet.compilerArguments = K2JSCompilerArguments().apply {
useDeprecatedLegacyCompiler = true
// 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"
forceDeprecatedLegacyCompilerUsage = true
}
facet.targetPlatform = JsPlatforms.defaultJsPlatform
@@ -264,7 +264,7 @@ class ModulesTxtBuilder {
"js" -> settings.compilerArguments =
K2JSCompilerArguments().also {
settings.targetPlatform = JsPlatforms.defaultJsPlatform
it.useDeprecatedLegacyCompiler = true
it.forceDeprecatedLegacyCompilerUsage = true
}
"native" -> settings.compilerArguments =
FakeK2NativeCompilerArguments().also { settings.targetPlatform = NativePlatforms.unspecifiedNativePlatform }
@@ -51,9 +51,7 @@ abstract class AbstractJsProtoComparisonTest : AbstractProtoComparisonTest<Proto
metaInfo = true
main = K2JsArgumentConstants.NO_CALL
freeArgs = ktFiles
useDeprecatedLegacyCompiler = true
// 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"
forceDeprecatedLegacyCompilerUsage = true
}
val env = createTestingCompilerEnvironment(messageCollector, outputItemsCollector, services)