Skip to content

Commit

Permalink
Delete products when dropping analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
Friendseeker committed Nov 30, 2023
1 parent 50df19a commit 5ea8f88
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -541,8 +541,13 @@ class IncrementalCompilerImpl extends IncrementalCompiler {
previousSetup match {
// The dummy output needs to be changed to .jar for this to work again.
// case _ if compileToJarSwitchedOn(mixedCompiler.config) => Analysis.empty
case Some(prev) if equiv.equiv(prev, currentSetup) => previousAnalysis
case Some(prev) if !equivPairs.equiv(prev.extra, currentSetup.extra) => Analysis.empty
case Some(prev) if equiv.equiv(prev, currentSetup) => previousAnalysis
case Some(prev) if !equivPairs.equiv(prev.extra, currentSetup.extra) =>
val classFileManager =
ClassFileManager.getClassFileManager(incOptions, output, outputJarContent)
val products = previousAnalysis.asInstanceOf[Analysis].relations.allProducts
classFileManager.delete(products.map(converter.toVirtualFile).toArray)
Analysis.empty
case _ =>
val srcs = config.sources.toSet
Incremental.prune(srcs, previousAnalysis, output, outputJarContent, converter, incOptions)
Expand Down

0 comments on commit 5ea8f88

Please sign in to comment.