Skip to content

Commit 59b4c7b

Browse files
committed
Readonly cache
1 parent f41fd01 commit 59b4c7b

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[versions]
2-
kotlin = "2.1.20-dev-3031"
2+
kotlin = "2.1.20-dev-4348"
33
kotlinIdeVersion = "1.9.20-506"
44
kotlinIdeVersionWithSuffix = "231-1.9.20-506-IJ8109.175"
55
spring-boot = "2.7.10"

src/main/kotlin/com/compiler/server/compiler/components/KotlinToJSTranslator.kt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ class KotlinToJSTranslator(
184184
icDir,
185185
outputDir,
186186
debugInfo
187-
)
187+
) + "-Xwasm-ic-cache-readonly=true"
188188
)
189189
}
190190
.map {
@@ -201,13 +201,7 @@ class KotlinToJSTranslator(
201201

202202
val time = measureTime {
203203
a = cacheDir?.let { dir ->
204-
usingTempDirectory { tmpDir ->
205-
val cachesDir = tmpDir.resolve("caches").normalize()
206-
if (dir.exists()) {
207-
dir.copyRecursively(cachesDir.toFile())
208-
}
209-
compileAction(cachesDir)
210-
}
204+
compileAction(dir.toPath())
211205
} ?: compileAction(null)
212206
}
213207
println("TIME: $time")

0 commit comments

Comments
 (0)