sbt/sbt — pull request #1013 by gkossakowski (2013-11-28 21:00:50+00:00)
Title: Used names extraction logic

This PR introduces another piece of name hashing algorithm as mentioned in #1010.

The first two (88444f2 and 40dc5cd) are purely cleanups/refactorings and do not change any behavior. The description of the third is copied below for convenience.

---

Tracking of used names is a component needed by the name hashing algorithm. The extraction and storage of used names is active only when `AnalysisCallback.nameHashing` flag is enabled and it's disabled by default.

This change constists of two parts:

1. Modification of Relations to include a new `names` relation that allows us to track used names in Scala source files
2. Implementation of logic that extracts used names from Scala compilation units (that correspond to Scala source files)

The first part is straightforward: add standard set of methods in Relations (along with their implementation) and update the logic which serializes and deserializes Relations.

The second part is implemented as tree walk that collects all symbols associated with trees. For each symbol we extract a simple, decoded name and add it to a set of extracted names. Check documentation of `ExtractUsedNames` for discussion of implementation details.

The `ExtractUsedNames` comes with unit tests grouped in `ExtractUsedNamesSpecification`. Check that class for details.

Given the fact that we fork while running tests in `compiler-interface` subproject and tests are ran in parallel which involves allocating multiple Scala compiler instances we had to bump the default memory limit.

This commit contains fixes for gkossakowski/sbt#3, gkossakowski/sbt#5 and gkossakowski/sbt#6 issues.