Only invalidate package objects that inherit from invalidated files.

Originally described in cf355f1822.
This commit is contained in:
Mark Harrah 2013-05-01 09:35:51 -04:00
parent 429131bdd8
commit 435bd1d587
1 changed files with 2 additions and 2 deletions

View File

@ -96,10 +96,10 @@ object Incremental
else invalidated
}
// Package objects are fragile: if they depend on an invalidated source, get "class file needed by package is missing" error
// Package objects are fragile: if they inherit from an invalidated source, get "class file needed by package is missing" error
// This might be too conservative: we probably only need package objects for packages of invalidated sources.
private[this] def invalidatedPackageObjects(invalidated: Set[File], relations: Relations): Set[File] =
invalidated flatMap relations.usesInternalSrc filter { _.getName == "package.scala" }
invalidated flatMap relations.publicInherited.internal.reverse filter { _.getName == "package.scala" }
/**
* Accepts the sources that were recompiled during the last step and functions