[IC] Register JS IC header file and lookup counter in transaction

#KT-49785 In Progress
This commit is contained in:
Alexander Likhachev
2022-11-22 23:07:44 +01:00
committed by Space Team
parent 20ed029ba5
commit 274c9b6294
8 changed files with 118 additions and 88 deletions
@@ -41,7 +41,8 @@ import java.io.File
open class IncrementalJsCache(
cachesDir: File,
pathConverter: FileToPathConverter,
serializerProtocol: SerializerExtensionProtocol
serializerProtocol: SerializerExtensionProtocol,
private val transaction: CompilationTransaction,
) : AbstractIncrementalCache<FqName>(cachesDir, pathConverter) {
companion object {
private const val TRANSLATION_RESULT_MAP = "translation-result"
@@ -72,6 +73,7 @@ open class IncrementalJsCache(
var header: ByteArray
get() = headerFile.readBytes()
set(value) {
transaction.registerAddedOrChangedFile(headerFile.toPath())
cachesDir.mkdirs()
headerFile.writeBytes(value)
}