Skip to content

Commit b05d750

Browse files
committed
Temporarily force persistent working directory for incremental compilation
1 parent 96e85ce commit b05d750

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/kotlin/io/bazel/worker/WorkingDirectoryContext.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,14 @@ class WorkingDirectoryContext(
3131
val logger: Logger = Logger.getLogger(WorkingDirectoryContext::class.java.canonicalName)
3232

3333
inline fun <T> use(forWork: WorkingDirectoryContext.() -> T) =
34-
WorkingDirectoryContext(Files.createTempDirectory("pwd")).use { wd ->
34+
// TODO: Find a good place to persist this, keep ephemeral directory for non-incremental
35+
WorkingDirectoryContext(java.nio.file.Paths.get("/tmp/kotlin_working_directory")).use { wd ->
3536
wd.forWork()
3637
}
3738
}
3839

3940
override fun close() {
41+
return
4042
kotlin
4143
.runCatching {
4244
Files.walk(dir).sorted(Comparator.reverseOrder()).forEach(Files::delete)

0 commit comments

Comments
 (0)