aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/sbt/ExtractAPI.scala
Commit message (Collapse)AuthorAgeFilesLines
* Move compiler and compiler tests to compiler dirFelix Mulder2016-11-221-518/+0
|
* Merge GenericType, TypeLambda and PolyTypeMartin Odersky2016-10-121-1/+1
|
* Fix incremental compilation when inline method body changesGuillaume Martres2016-10-021-2/+18
| | | | | | Since we have no nice way of hashing a typed tree we use the pretty-printed tree of the method (as it would be printed by -Xprint:posttyper -Xprint-types) as a hacky substitute for now.
* ExtractAPI: Add support for RecTypeGuillaume Martres2016-07-121-2/+14
|
* ExtractAPI: Add support for TypeLambdasGuillaume Martres2016-07-121-4/+11
| | | | | Before the new higher-kinded implementation this wasn't needed because lambdas were just RefinedTypes.
* ExtractAPI: Do not miss value parameters of PolyTypesGuillaume Martres2016-07-121-0/+3
| | | | | This bug has been present since we merged this phase. In the new test `signature-change`, only "Case 1" did not pass before.
* Address reviewers commentsMartin Odersky2016-07-111-1/+2
|
* Remove old hk schemeMartin Odersky2016-07-111-2/+2
| | | | | | | | | | | | - Simplify RefinedType - Drop recursive definition of RefinedThis - this is now taken over by RecType. - Drop RefinedThis. - Simplify typeParams The logic avoiding forcing is no longer needed. - Remove unused code and out of date comments.
* Add sbt incremental compilation supportGuillaume Martres2016-05-281-0/+479
To test this with sbt, see https://github.com/lampepfl/dotty/wiki/Using-Dotty-with-sbt The following flags are added: - -Yforce-sbt-phases: Run the phases used by sbt for incremental compilation (ExtractDependencies and ExtractAPI) even if the compiler is ran outside of sbt, for debugging. - -Ydump-sbt-inc: For every compiled foo.scala, output the API representation and dependencies used for sbt incremental compilation in foo.inc, implies -Yforce-sbt-phases. This commit introduces two new phases which do not transform trees: - `ExtractDependencies` which extracts the dependency information of the current compilation unit and sends it to sbt via callbacks - `ExtractAPI` which creates a representation of the API of the current compilation unit and sends it to sbt via callbacks Briefly, when a file changes sbt will recompile it, if its API has changed (determined by what `ExtractAPI` sent) then sbt will determine which reverse-dependencies (determined by what `ExtractDependencies` sent) of the API have to be recompiled depending on what changed. See http://www.scala-sbt.org/0.13/docs/Understanding-Recompilation.html for more information on how sbt incremental compilation works. This phase was originally based on https://github.com/adriaanm/scala/tree/sbt-api-consolidate/src/compiler/scala/tools/sbt which attempts to integrate the sbt phases into scalac (and is itself based on https://github.com/sbt/sbt/tree/0.13/compile/interface/src/main/scala/xsbt), but it has been heavily refactored and adapted to Dotty. The main functional differences are: - ExtractDependencies runs right after Frontend (so that we don't lose dependency informations because of the simplifications done by PostTyper), but ExtractAPI runs right after PostTyper (so that SuperAccessors are part of the API). - `ExtractAPI` only extract types as they are defined and never "as seen from" some some specific prefix, see its documentation for more details. - `ExtractDependenciesTraverser` and `ExtractUsedNames` have been fused into one tree traversal in `ExtractDependenciesCollector`. TODO: Try to run these phases in parallel with the rest of the compiler pipeline since they're independent (except for the sbt callbacks in `GenBCode`) ?