Merge pull request #7969 from Friendseeker/clean-zinc-cache

[1.x] Clear Zinc Analysis Cache during `Compile / clean`, `Test / clean`
This commit is contained in:
eugene yokota 2024-12-28 23:57:59 -05:00 committed by GitHub
commit 038d9b28e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 14 additions and 1 deletions

View File

@ -928,7 +928,20 @@ object Defaults extends BuildCommon {
tastyFiles.map(_.getAbsoluteFile)
} else Nil
}.value,
clean := (compileOutputs / clean).value,
clean := {
val _ = (compileOutputs / clean).value
val analysisFile = compileAnalysisFile.value
try {
val store = AnalysisUtil.staticCachedStore(
analysisFile = analysisFile.toPath,
useTextAnalysis = !enableBinaryCompileAnalysis.value,
useConsistent = enableConsistentCompileAnalysis.value,
)
store.clearCache()
} catch {
case NonFatal(_) => ()
}
},
earlyOutputPing := Def.promise[Boolean],
compileProgress := {
val s = streams.value