From c0e6e0c0882b4a15c5c6f6b524f6917bbbc6872f Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Sun, 14 Feb 2010 20:25:45 -0500 Subject: [PATCH] fix for staged compilation task --- tasks/standard/Compile.scala | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tasks/standard/Compile.scala b/tasks/standard/Compile.scala index ecdbd4791..f1f7c2937 100644 --- a/tasks/standard/Compile.scala +++ b/tasks/standard/Compile.scala @@ -110,16 +110,17 @@ class AggressiveCompile(val cacheDirectory: File, val compilerTask: Task[Analyzi val newAPIMap = doCompile(sources, classpath, outputDirectory, options, tracker, compiler, log) val apiChanged = sources filter { src => !sameAPI(previousAPIMap, newAPIMap, src) } log.info("Sources with API changes:\n\t" + apiChanged.mkString("\n\t")) + lazy val nextSources = transitiveIfNeeded.invalid ** sourceChanges.checked + def nextDone = nextSources.forall(sources contains _) val finalAPIMap = - // if either nothing changed or everything was recompiled, stop here - if(apiChanged.isEmpty || sources.size == sourceChanges.checked.size) newAPIMap + // if either nothing changed or everything was already recompiled, stop here + if(apiChanged.isEmpty || nextDone) newAPIMap else { //val changedNames = TopLevel.nameChanges(newAPIMap.values, previousAPIMap.values) InvalidateTransitive.clean(tracker, FileUtilities.delete, transitiveIfNeeded) - val sources = transitiveIfNeeded.invalid ** sourceChanges.checked - log.info("All sources invalidated by API changes:\n\t" + sources.mkString("\n\t")) - doCompile(sources, classpath, outputDirectory, options, tracker, compiler, log) + log.info("All sources invalidated by API changes:\n\t" + nextSources.mkString("\n\t")) + doCompile(nextSources, classpath, outputDirectory, options, tracker, compiler, log) } finalAPIMap.foreach { case (src, api) => tracker.tag(src, APIFormat.write(api)) } }