| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
are captured
|
| |
|
|
|
|
|
|
| |
* Dedicated scalaDoc plugins and options
* Use T{} for consistency
|
| |
|
|
|
|
|
|
| |
* Remove useless type parameters for {Test,}Evaluator
* Update Evaluator.scala
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mill was trying to read all files found under the source directory to
create a digest for each of them. This was causing an error for broken
symlinks.
At first I believed temporary files should be ignored to avoid this problem,
and asked at the gitter channel how to go about this, but overriding the `sources`
task as [suggested](https://gitter.im/lihaoyi/mill?at=5ad6cd801130fe3d36eb7655)
by @lihaoyi didn't actually help.
on a simple scala project, editing a file with Emacs, creates a link file, like:
```
vic@oeiuwq ~/h/foo> ls -la foo/src/
total 8
drwxr-xr-x 4 vic staff 128 Sep 1 12:23 .
lrwxr-xr-x 1 vic staff 22 Sep 1 12:23 .#hello.scala -> vic@oeiuwq.local.10748
drwxr-xr-x 3 vic staff 96 Sep 1 12:22 ..
-rw-r--r-- 1 vic staff 12 Sep 1 12:22 hello.scala
```
So this patch only makes sures that the files (or the symlink here) is actually
readable before trying to digest it.
Fixes #402
|
|
|
|
|
|
| |
* Remove duplication from ClassLoader.create
* Prevent closing of context class loader in tests so that shutdown hooks can run
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#414)
* Upgrade ammonite to 1.1.2-30-53edc31
This is mainly to get https://github.com/lihaoyi/Ammonite/pull/851 which
should reduce the amount of unnecessary work done by incremental
compilation in the Mill build. This requires some code changes since
this means we now depend on a more recent version of coursier, as a
side-effect this means that we do not depend on scalaz anymore.
Also use the same ammonite version in the Mill build and in
ScalaModule#ammoniteReplClasspath.
Also remove an incorrect dependency in the caffeine integration test.
This was always wrong but did not start failing until this commit,
probably due to dependencies appearing in a different order on the
classpath.
* Rename ScalaWorker to ZincWorker
Starting with the next commit, it will be used in Java-only projects
too, so the name is misleading.
* Upgrade to Zinc 1.2.1
* Fix incremental compilation when a Scala project depends on a Java project
Before this commit, JavaModule#compile simply called javac
unconditionally, thus generating new classfiles every time. But if a
Scala project depends on a Java project, this will throw off the
incremental compilation algorithm which will unnecessarily recompile
files. To avoid this we now use Zinc to compile Java projects too (as a
bonus this means that Java compilation becomes incremental). This
required some refactoring in ZincWorkerImpl to be able to compile stuff
without having to pass Scala-specific options.
The issue solved by this commit could be reproduced by running in the
Mill repository:
$ mill main.compile
$ mill -i
@ main.compile()
and observing that before this commit, the `main.compile()` call ended
up recompiling code.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
- Combine `main/` and `core/`
- Rename `jsbridges/`/`scalanativebridges/` -> `worker/` for consistency with other terminology
|
|
|
|
| |
This makes it easier to hack on Mill using Mill itself, the evaluator is
available using `replApplyHandler.evaluator`
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* Add VisualizePlan.svg to docs build
* Use simpler graph
|
|
|
|
|
|
|
| |
* Simple BuildInfo plugin
* BuildInfo readme
include other known yet external plugins
* Add tests
|
| |
|
|
|
|
| |
run/runBackground
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Make necessary import changes
* Refactor to allow calling internally w/o println
* Refactor to allow multiple visualize modes
* Add new visualizaPlan grap entire plan
* Remove and alphabetize imports
* Document visualizePlan
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Abstract over the scala compiler organization
* Support using a locally published compiler
Publishing locally with sbt means publishing ivy-style, which uses
a different naming convention than maven, we now handle both cases.
* Add minimal support for Dotty projects
* Rewrite scalalib.Dep, introduce scalalib.CrossVersion
Instead of Dep being a trait with three cases (Java/Scala/Point), it is
now a case class where the cross field is an instance of the
CrossVersion trait which has three cases (Constant/Binary/Full). This is
more versatile since it allows for non-empty constant suffixes which
will be used to implement withDottyCompat in the next commit. It's
also a cleaner separation of concerns. We also deduplicate various
pieces of codes that computed the artifact name: this is now always handled in
Dep and CrossVersion.
* Add simple way to use Scala 2 deps in a Dotty project
This is similar to the withDottyCompat method in the sbt-dotty plugin.
* Turn off the Dotty test on Java >= 9
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* Add ScalaPB integration
* Update ci scripts with new scalapblib module
* Move ScalaPB integration to contrib module
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So far, Mill was caching ScalaInstance which contains a classloader but
this is not enough: Zinc creates its own classloader by combining the
ScalaInstance classloader with the path to the compiler-bridge. Zinc
takes care of caching this classloader in each instance of
ScalaCompiler.
We can take advantage of this by caching an instance of Compilers since
it contains everything we want to cache (ScalaCompiler and
ScalaInstance).
This significantly reduces the amount of classloading that happens
at each compilation step, as measured by running:
export _JAVA_OPTIONS="-XX:+UnlockDiagnosticVMOptions -XX:+TraceClassLoading -XX:+TraceClassUnloading"
mill -i foo.compile
Then looking at the output of `out/mill-worker-1/logs` while adding a
new line in a source file in `foo` and running `mill -i foo.compile` again.
The speedup is going to depend on the project, but I measured a ~2x
improvement when running on the Mill build `time(core.compile())` and
`rm -rf out/core/compile/` in a loop until results stabilized. See also
the results that were obtained when a very similar issue was fixed in
sbt itself: https://github.com/sbt/sbt/pull/2754
|
|
|
| |
They will be classloaded by the compiler itself based on -Xplugin.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove dead code
* Upgrade zinc to 1.1.7, avoid hardcoding the version
* Fix over-compilation with Zinc
`upstreamCompileOutput` needs to contain the CompileOutput of all
recursive dependencies, otherwise Zinc gets confused when a classfile
from one of these recursive dependency is used, resulting in
over-compilation.
No tests because I don't know how to write one, but this can be observed
manually:
1. mill scalajslib.compile
2. Add an empty line to ScalaModule.scala
3. mill scalajslib.compile
Before this commit, the last compilation ended up compiling one file in
scalalib (as expected), then every file in scalajslib. After this
commit, nothing in scalajslib is recompiled, as expected.
|
| |
|