sbt, the interactive build tool
Go to file
Grzegorz Kossakowski aac19fd02b Extract source code dependencies by tree walking.
Previously incremental compiler was extracting source code
dependencies by inspecting `CompilationUnit.depends` set. This set is
constructed by Scala compiler and it contains all symbols that given
compilation unit refers or even saw (in case of implicit search).
There are a few problems with this approach:

  * The contract for `CompilationUnit.depend` is not clearly defined
    in Scala compiler and there are no tests around it. Read: it's
    not an official, maintained API.
  * Improvements to incremental compiler require more context
    information about given dependency. For example, we want to
    distinguish between dependency on a class when you just select
    members from it or inherit from it. The other example is that
    we might want to know dependencies of a given class instead of
    the whole compilation unit to make the invalidation logic more
    precise.

That led to the idea of pushing dependency extracting logic to
incremental compiler side so it can evolve indepedently from Scala
compiler releases and can be refined as needed. We extract
dependencies of a compilation unit by walking a type-checked tree
and gathering symbols attached to them.

Specifically, the tree walk is implemented as a separate phase that
runs after pickler and extracts symbols from following tree nodes:

  * `Import` so we can track dependencies on unused imports
  * `Select` which is used for selecting all terms
  * `Ident` used for referring to local terms, package-local terms
            and top-level packages
  * `TypeTree` which is used for referring to all types

Note that we do not extract just a single symbol assigned to `TypeTree`
node because it might represent a complex type that mentions
several symbols. We collect all those symbols by traversing the type
with CollectTypeTraverser. The implementation of the traverser is inspired
by `CollectTypeCollector` from Scala 2.10. The
`source-dependencies/typeref-only` test covers a scenario where the
dependency is introduced through a TypeRef only.
2013-11-26 18:39:23 +01:00
cache deprecations 2013-02-25 09:24:04 -05:00
compile Extract source code dependencies by tree walking. 2013-11-26 18:39:23 +01:00
interface Extract source code dependencies by tree walking. 2013-11-26 18:39:23 +01:00
ivy Better representation of no cross-version suffix in suffix conflict error message. 2013-10-23 09:46:43 -04:00
launch Allow specifying sbt.boot.properties as a URI 2013-11-06 20:33:52 -05:00
licenses move remaining pieces of sbt subproject to sbt_pending and fix notices 2010-09-21 21:55:50 -04:00
main Expand aliases instead of evaluating directly. 2013-11-24 15:19:24 -05:00
project execute scripted test without publishing SBT first 2013-11-13 15:51:21 -05:00
run Fixes #989, #990. TrapExit jvm-independent and awt handling is only done when awt is used. 2013-11-18 17:35:06 -05:00
sbt Extract source code dependencies by tree walking. 2013-11-26 18:39:23 +01:00
scripted Recover from failed 'reload' command in the scripted sbt handler. 2013-09-18 10:27:19 -04:00
src Docs: reorganize table of contents. 2013-11-23 20:51:52 -05:00
tasks fix task execution test compilation 2013-06-28 00:01:19 -04:00
testing Third draft to execute the forked tests in parallel. 2013-11-21 08:20:43 -05:00
util Remove the need for resetLocalAttrs. Fixes #994, #952. 2013-11-22 13:08:10 -05:00
.gitattributes Added .gitattributes file. 2013-04-25 00:06:51 +08:00
.gitignore support defining Projects in .sbt files 2012-12-09 20:40:41 -05:00
CONTRIBUTING.md Restore sxr support and fix links to sxr'd sources. Fixes #863. 2013-09-24 11:34:14 -04:00
LICENSE * move Environment classes to util/env module 2010-07-14 19:24:50 -04:00
NOTICE * move Environment classes to util/env module 2010-07-14 19:24:50 -04:00
README.md clean up CONTRIBUTING and README 2013-06-28 19:06:56 -04:00
api.specification Macro def aware recompilation. 2012-03-04 17:35:51 +01:00
scripted.specification New scripted test framework 2009-11-09 09:34:52 -05:00

README.md

sbt 0.13

This is the 0.13.x series of sbt.

  • Setup: Describes getting started with the latest binary release.
  • See CONTRIBUTING for how to build from source, open an issue, fix or add documentation, or submit a pull request.
  • FAQ: Explains how to get help and more.
  • Google Code: hosts sbt 0.7.7 and earlier versions