| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
bin/common: make check_jar work outside of dotty root
|
| | |
|
|/
|
|
|
| |
Dotty uses ammonite.terminal since April (53bd25f) which replaces JLine.
There is no reason to keep it anymore.
|
| |
|
| |
|
|
|
|
| |
Fixup from the last PR, review: @DarkDimius
|
| |
|
| |
|
| |
|
|
|
|
| |
coursier
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New algorithm similar to proposal by @DarkDimius:
1. Bash script checks for existance of `$DOTTY_ROOT/.packages`, if not
found - rebuilds all packages and places their full paths in the
`.packages` file in the following order:
- dotty-interfaces
- dotty
- dotty-tests
2. Checks if there are any files newer than those contained within
`.packages` and if so - rebuilds that package
3. Runs Java with correct classpath setup
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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`) ?
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We introduce a new entry point for the compiler in
`dotty.tools.dotc.Driver`:
```
def process(args: Array[String], simple: interfaces.SimpleReporter,
callback: interfaces.CompilerCallback): interfaces.ReporterResult
```
Except for `args` which is just an array, the argument types and return
type of this method are Java interfaces defined in a new package called
`dotty-interfaces` which has a stable ABI. This means that you can
programmatically run a compiler with a custom reporter and callbacks
without having to recompile it against every version of dotty: you only
need to have `dotty-interfaces` present at compile-time and call the
`process` method using Java reflection.
See `test/test/InterfaceEntryPointTest.scala` for a concrete example.
This design is based on discussions with the IntelliJ IDEA Scala plugin
team. Thanks to Nikolay Tropin for the discussions and his PR
proposal (see #1011).
|
|
|
|
|
| |
It's already used to specify an output folder, don't try to interpret it
as a shortcut for -debug
|
|
|
|
| |
Used to always use bootstrapped version
|
|
|
|
| |
dot script now has -bootstrapped option that will use dotty-compiled-by-dotty.
|
|
|
|
| |
@vladimirNik, should simplify your life
|
|
|
|
|
| |
- Fix typo in JLINE_JAR
- Implement proper Java launch in Cygwin
|
| |
|
| |
|
| |
|
|
|
|
| |
See https://github.com/scala/scala/pull/4465 for details.
|
|
|
|
|
|
|
| |
This update allows to have non-static lambdas.
It doesn't mean that we should emit such,
as they are potential memory leak. See #480
Fixes #470
|
| |
|
|
|
|
|
| |
Includes fixed for emitting string concatenation if string originates from an array.
Eg `"hello " + Array("world")(0)`
|
|
|
|
|
|
|
|
|
|
| |
Dotty requires a mangled bootclasspath to start.
It means that `console` mode of sbt doesn't work for us.
At least I wasn't able to make sbt fork in console,
so instead I've added a Scala-repl into dotty itself :-)
It would be good to make it use dotty one day when we have
a backend :-)
|
|
|
|
|
|
|
|
| |
When CDPATH is set, cd echoes the directory that it is switching to.
The ( cd && pwd ) pattern then prints the directory twice, causing
a mangled path.
See https://bosker.wordpress.com/2012/02/12/bash-scripters-beware-of-the-cdpath/
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Ideally, dotc should reuse a resident compiler and we should not fork sbt
for every task. Until this happens, this option is useful for
development. Fixes #222.
Usage:
$ sbt -DOshort=""
$ ./bin/dotc -Oshort foo.scala
|
| |
|
| |
|
|
|
|
| |
There were a lot in StoreReporter, as we are creating about 0.5M new ones per self-compile.
|
|
|