From b70345c61b288276d5237261458c6676f34b696d Mon Sep 17 00:00:00 2001 From: Benjy Date: Tue, 17 Mar 2015 23:55:25 +0000 Subject: [PATCH] Warn when ignoring previous analysis for various reasons. This can confuse users and is hard to debug. It seems better to be explicit about why we're choosing not to do an incremental compile. --- .../src/main/scala/sbt/compiler/AggressiveCompile.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compile/integration/src/main/scala/sbt/compiler/AggressiveCompile.scala b/compile/integration/src/main/scala/sbt/compiler/AggressiveCompile.scala index c25b0673d..201e6108d 100644 --- a/compile/integration/src/main/scala/sbt/compiler/AggressiveCompile.scala +++ b/compile/integration/src/main/scala/sbt/compiler/AggressiveCompile.scala @@ -149,9 +149,12 @@ class AggressiveCompile(cacheFile: File) { // previous Analysis completely and start with empty Analysis object // that supports the particular value of the `nameHashing` flag. // Otherwise we'll be getting UnsupportedOperationExceptions + log.warn("Ignoring previous analysis due to incompatible nameHashing setting.") Analysis.empty(currentSetup.nameHashing) case Some(previous) if equiv.equiv(previous, currentSetup) => previousAnalysis - case _ => Incremental.prune(sourcesSet, previousAnalysis) + case _ => + log.warn("Pruning sources from previous analysis, due to incompatible CompileSetup.") + Incremental.prune(sourcesSet, previousAnalysis) } IncrementalCompile(sourcesSet, entry, compile0, analysis, getAnalysis, output, log, incOptions) }