[JS IR] Commit cache header after lowering

Commiting cache header before lowering may
 break caches in case of lowering errors.

^KT-54912 Fixed
This commit is contained in:
Alexander Korepanov
2022-11-16 22:40:23 +01:00
committed by Space Team
parent 8cde0a81bc
commit ca19d71a00
8 changed files with 92 additions and 91 deletions
@@ -229,7 +229,7 @@ abstract class AbstractInvalidationTest : KotlinTestWithEnvironment() {
val cacheUpdater = CacheUpdater(
mainModule = testInfo.last().modulePath,
allModules = testInfo.mapTo(mutableListOf(STDLIB_KLIB)) { it.modulePath },
icCacheRootDir = buildDir.resolve("incremental-cache").absolutePath,
cacheDir = buildDir.resolve("incremental-cache").absolutePath,
compilerConfiguration = configuration,
irFactory = { IrFactoryImplForJsIC(WholeWorldStageController()) },
mainArguments = null,
@@ -193,7 +193,7 @@ abstract class AbstractJsKLibABITestCase : KtUsefulTestCase() {
val cacheUpdater = CacheUpdater(
mainModule = mainModuleKlibFile.absolutePath,
allModules = allDependencies.regularDependencies.map { it.path },
icCacheRootDir = buildDir.resolve("libs-cache").absolutePath,
cacheDir = buildDir.resolve("libs-cache").absolutePath,
compilerConfiguration = configuration,
irFactory = { IrFactoryImplForJsIC(WholeWorldStageController()) },
mainArguments = null,