| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This method could be called from multiple threads since sbt could
run multiple `compile` task in parallel.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, every call to `compile` in sbt with dotty took about the
same time because we created a new ClassLoader everytime and thus
thrased the JIT code cache, by reusing ClassLoaders we can make
`compile` about 2x faster.
You can reproduce this by running:
> dotty-compiler-bootstrapped/compile
This takes ~50 seconds on my machine. Then clean using:
> ;dotty-compiler-bootstrapped/clean;dotty-compiler-update
And run `dotty-compiler-bootstrapped/compile` again, this takes ~25
seconds for me. I get very similar timings from scalac (replacing
`dotty-compiler-bootstrapped` by `dotty-compiler`).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit is a very crude port of the classpath handling as it exists
in the 2.12.x branch of scalac (hash: 232d95a198c94da0c6c8393624e83e9b9ac84e81),
this replaces the existing Classpath code that was adapted from scalac
years ago.
This code was written by Grzegorz Kossakowski, Michał Pociecha, Lukas
Rytz, Jason Zaugg and other scalac contributors, many thanks to them!
For more information on this implementation, see the description of the
PR that originally added it to scalac: https://github.com/scala/scala/pull/4060
Changes made to the copied code to get it to compile with dotty:
- Rename scala.tools.nsc.util.ClassPath to dotty.tools.io.ClassPath
- Rename scala.tools.nsc.classpath.* to dotty.tools.dotc.classpath.*
- Replace "private[nsc]" by "private[dotty]"
- Changed `isClass` methods in FileUtils to skip Scala 2.11
implementation classes (needed until we stop being retro-compatible with
Scala 2.11)
I also copied PlainFile.scala from scalac to get access to
`PlainNioFile`.
|
| |
|
|
|
|
|
| |
Also fix a bug where the compiler output for the tests ended up in the
wrong directory, causing some new tests from 0.13.14 to fail.
|
|
|
|
|
|
| |
This is temporary until someone figures out how to get sbt to not print
duplicated information when this is turned on. This might require
changes to sbt itself.
|
|
|
|
|
|
|
|
|
| |
These changes were done to imitate how these fields are set in
https://github.com/sbt/sbt/blob/0.13/compile/interface/src/main/scala/xsbt/DelegatingReporter.scala
The main issue this fixes is sbt displaying the ^ pointer way too far,
because the number of spaces was set from the beginning of the file
instead of the beginning of the line.
|
| |
|
| |
|
| |
|
|\
| |
| | |
restore position offset in DelegatingReporter
|
| | |
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is useful for two reasons:
- All published Scala versions are of the form a.b.c and some tooling
expect that, like sbt CrossVersion API.
- Using 0.1.1 instead of 0.1.0 means that we match the version number of
dotty-sbt-bridge, this is simpler and means that in the future sbt
could automatically choose the correct version of dotty-sbt-bridge so
that the user does not need to specify scalaCompilerBridgeSource in
his build.sbt
Note: it's awful that we have hardcoded paths to jars and that I had to
change them, but I won't fix that now.
|
|
|
|
|
|
|
|
|
| |
This is necessary for correct incremental recompilation but is also used
by sbt to find tests to run (for junit they should be annotated @org.junit.Test).
I added an sbt scripted test to verify that JUnit now works, to run it:
$ sbt
> scripted discovery/test-discovery
|
| |
|
| |
|
| |
|
|
|