[K/JS] Add useEsClasses to list of compiler arguments that invalidate IC cache ^KT-61795 Fixed

This commit is contained in:
Artem Kobzar
2023-09-13 09:50:24 +00:00
committed by Space Team
parent 274d7ba47d
commit 2578bfefd5
11 changed files with 12 additions and 19 deletions
@@ -132,6 +132,7 @@ abstract class AbstractInvalidationTest(
copy.put(JSConfigurationKeys.MODULE_KIND, moduleKind)
copy.put(JSConfigurationKeys.PROPERTY_LAZY_INITIALIZATION, true)
copy.put(JSConfigurationKeys.SOURCE_MAP, true)
copy.put(JSConfigurationKeys.USE_ES6_CLASSES, targetBackend == TargetBackend.JS_IR_ES6)
copy.languageVersionSettings = with(LanguageVersionSettingsBuilder()) {
language.forEach {
@@ -370,7 +371,6 @@ abstract class AbstractInvalidationTest(
granularity,
getPhaseConfig(projStep.id),
setOf(FqName(BOX_FUNCTION_NAME)),
targetBackend == TargetBackend.JS_IR_ES6
)
}
)
@@ -86,7 +86,6 @@ class JsIrBackendFacade(
val splitPerFile = JsEnvironmentConfigurationDirectives.SPLIT_PER_FILE in module.directives
val perModule = JsEnvironmentConfigurationDirectives.PER_MODULE in module.directives
val keep = module.directives[JsEnvironmentConfigurationDirectives.KEEP].toSet()
val es6Mode = JsEnvironmentConfigurationDirectives.ES6_MODE in module.directives
val granularity = when {
!firstTimeCompilation -> JsGenerationGranularity.WHOLE_PROGRAM
@@ -153,7 +152,6 @@ class JsIrBackendFacade(
exportedDeclarations = setOf(FqName.fromSegments(listOfNotNull(testPackage, TEST_FUNCTION))),
keep = keep,
dceRuntimeDiagnostic = null,
es6mode = es6Mode,
safeExternalBoolean = JsEnvironmentConfigurationDirectives.SAFE_EXTERNAL_BOOLEAN in module.directives,
safeExternalBooleanDiagnostic = module.directives[JsEnvironmentConfigurationDirectives.SAFE_EXTERNAL_BOOLEAN_DIAGNOSTIC].singleOrNull(),
granularity = granularity,
@@ -17,7 +17,6 @@ import org.jetbrains.kotlin.konan.properties.propertyList
import org.jetbrains.kotlin.library.KLIB_PROPERTY_DEPENDS
import org.jetbrains.kotlin.library.KotlinLibrary
import org.jetbrains.kotlin.name.FqName
import org.jetbrains.kotlin.test.TargetBackend
import org.jetbrains.kotlin.test.directives.JsEnvironmentConfigurationDirectives
import org.jetbrains.kotlin.test.model.TestModule
import org.jetbrains.kotlin.test.services.*
@@ -87,7 +86,7 @@ class JsIrIncrementalDataProvider(private val testServices: TestServices) : Test
.run { if (shouldBeGenerated()) arguments() else null }
runtimeKlibPath.forEach {
recordIncrementalData(it, null, libs, configuration, mainArguments, module.targetBackend)
recordIncrementalData(it, null, libs, configuration, mainArguments)
}
}
@@ -109,7 +108,6 @@ class JsIrIncrementalDataProvider(private val testServices: TestServices) : Test
allDependencies + library,
configuration,
mainArguments,
module.targetBackend
)
}
@@ -119,7 +117,6 @@ class JsIrIncrementalDataProvider(private val testServices: TestServices) : Test
allDependencies: List<KotlinLibrary>,
configuration: CompilerConfiguration,
mainArguments: List<String>?,
targetBackend: TargetBackend?
) {
val canonicalPath = File(path).canonicalPath
val predefinedModuleCache = predefinedKlibHasIcCache[canonicalPath]
@@ -150,7 +147,6 @@ class JsIrIncrementalDataProvider(private val testServices: TestServices) : Test
IrFactoryImplForJsIC(WholeWorldStageController()),
setOf(FqName.fromSegments(listOfNotNull(testPackage, JsBoxRunner.TEST_FUNCTION))),
mainArguments,
targetBackend == TargetBackend.JS_IR_ES6
)
val moduleCache = icCache[canonicalPath] ?: TestArtifactCache(mainModuleIr.name.asString())