sbt/compile
Mark Harrah 658c3d06c4 Use public inherited dependencies in incremental compilation invalidation.
1. All parents of public/exported classes/modules/packages are tracked as
   'publicInherited' dependencies.  These are dealiased and normalized so
    that the dependency is on the actual underlying template and not the
    source enclosing the alias.
2. All CompilationUnit.depends dependencies are direct dependencies.  These
   include inherited dependencies.
3. When invalidating changed internal sources,
	a. Invalidate all inherited dependencies, transitively and include the
      originally modified sources,
	b. Invalidate all direct dependencies of these sources,
	c. Exclude any sources that were compiled in the previous step unless they
      depend on a newly invalidated source.
4. Invalidate changed external sources in the same way as #3 but remove the
   external sources from the final set.

Only public inheritance dependencies need to be considered because a template
that is not accessible outside its source file and that inherits from another
file can be handled as a normal, direct dependency.  Because the template
isn't public, changes to its API will not propagate outside of the source
file.

Several existing tests cover the correctness, especially:

1. transitive-a covers direct, transitive dependencies with inferred return
   types
2. transitive-b covers inherited, transitive dependencies with inferred return
   types

There are two new tests, one that tests that public inherited dependencies are
tracked and one that verifies the basic invalidation progression.
More tests are needed to verify the improvements that this algorithm brings:

1. Inheritance-related dependencies are processed in one step to avoid the
   otherwise unavoidable several steps.
2. Only immediate direct dependencies are ever processed, which should in many
   typical cases avoid large invalidation sets.
2013-04-26 22:36:06 -04:00
..
api deprecations 2013-02-25 09:24:04 -05:00
inc Use public inherited dependencies in incremental compilation invalidation. 2013-04-26 22:36:06 -04:00
integration/src/main/scala/sbt/compiler drop canonicalization of files on classpath and other cleanup. Fixes #723. 2013-04-09 20:13:06 -04:00
interface Record and persist public inheritance dependencies. 2013-04-26 22:35:27 -04:00
ivy/src/main/scala/sbt/compiler Follow source layout convention supported by Eclipse. 2012-12-07 10:27:08 -08:00
persist Record and persist public inheritance dependencies. 2013-04-26 22:35:27 -04:00
src/main/scala/sbt Export approximate command lines executed for 'doc', 'compile', and 'console' 2013-02-28 17:59:38 -05:00
NOTICE - Stuart's improvements to triggered execution 2010-07-05 12:53:37 -04:00