[JS IR] Fix cache format, module name one the second line

This commit is contained in:
Ilya Goncharov
2022-01-25 20:40:24 +03:00
committed by Space
parent 76637a8844
commit 32cda8a37e
4 changed files with 10 additions and 10 deletions
@@ -190,7 +190,7 @@ class PersistentCacheProviderImpl(private val cachePath: String) : PersistentCac
override fun moduleName(): String {
val infoFile = File(File(cachePath), "info")
return infoFile.readLines()[3]
return infoFile.readLines()[1]
}
}
@@ -203,7 +203,7 @@ interface PersistentCacheConsumer {
fun commitSourceMap(path: String, mapData: ByteArray)
fun invalidateForFile(path: String)
fun commitLibraryInfo(libraryPath: String, flatHash: ULong, transHash: ULong, configHash: ULong, moduleName: String)
fun commitLibraryInfo(libraryPath: String, moduleName: String, flatHash: ULong, transHash: ULong, configHash: ULong)
companion object {
val EMPTY = object : PersistentCacheConsumer {
@@ -231,7 +231,7 @@ interface PersistentCacheConsumer {
}
override fun commitLibraryInfo(libraryPath: String, flatHash: ULong, transHash: ULong, configHash: ULong, moduleName: String) {
override fun commitLibraryInfo(libraryPath: String, moduleName: String, flatHash: ULong, transHash: ULong, configHash: ULong) {
}
@@ -324,7 +324,7 @@ class PersistentCacheConsumerImpl(private val cachePath: String) : PersistentCac
commitByteArrayToCacheFile(path, fileSourceMap, mapData)
}
override fun commitLibraryInfo(libraryPath: String, flatHash: ULong, transHash: ULong, configHash: ULong, moduleName: String) {
override fun commitLibraryInfo(libraryPath: String, moduleName: String, flatHash: ULong, transHash: ULong, configHash: ULong) {
val infoFile = File(File(cachePath), "info")
if (infoFile.exists()) {
infoFile.delete()
@@ -333,10 +333,10 @@ class PersistentCacheConsumerImpl(private val cachePath: String) : PersistentCac
PrintWriter(infoFile).use {
it.println(libraryPath)
it.println(moduleName)
it.println(flatHash.toString(16))
it.println(transHash.toString(16))
it.println(configHash.toString(16))
it.println(moduleName)
}
}
}