| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
| |
That way, we do not prevent class loader unloading / garbage collection.
Also, we reduce the chance to use an outdated class loader.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* More improvements to ZincWorkerImpl
- Cache classloaders separately from `ScalaInstance`s
- Pre-compute `analysisMap` to speed up lookups
- Allow compile-to-jar using sbt/zinc 1.3.0-m1
* Update build.sc
* Update ZincWorkerModule.scala
* Update ZincWorkerImpl.scala
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Allow usage of ZincWorkerImpl without hashing files
This is to better support non-Mill build tools like Bazel or Make who might do their own file hashing/mtiming for change-detection
* Update ZincWorkerImpl.scala
* Update ZincWorkerImpl.scala
* Update ZincWorkerImpl.scala
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Generalize Zinc worker
- Compiler bridges can now be either pre-compiled or on-demand-compiled
- Scala library/compiler jar discovery is now configurable
- Zinc compiler cache is now configurable, rather than being hardcoded at n=1
* .
* update constructor args
* remove duplicate util/AggWrapper.scala file
* fix
* fix
* fix
* cleanup
|
|
|
|
|
|
| |
* collapse boilerplate folder structure within src/ folders
* .
|
|
|
|
|
|
|
|
|
| |
This reduces the {scala,scalajs,scalanative}-worker dependency from the entirety of Mill to a much narrower `mill.api` module. This reduces the amount of classpath pollution within these workers, should mean they're much faster to download the first time, and reduces the amount of random junk they would pull in if they were to be used outside of the Mill project.
The interactions between the various *Modules and their *WorkerImpls has been narrowed down to the `*.api` modules, which only depend on other `*.api` modules.
A lot of things have been moved around; user code is unlikely to break, but it's possible some will if it references classes that have been moved around. Forwarders have been left for the few internal classes that Mill uses in it's own `build.sc`, to support bootstrapping. Third-party code which breaks should be a straightforward to fix just by updating imports
The `*.api` modules have minimal dependencies (mostly uPickle and os-lib) and minimal code. There is still a bunch of implementation code in there: some of it defining data-types that are commonly sent across the module/worker interface (`Agg`, `PathRef`, ...), and some of it just general helper functions that are needed both in modules and workers. The latter code isn't strictly API definitions, but for now is small enough it's not worth splitting into it's own module
|
|
|
|
| |
__.compile works, haven't run tests yet
|
| |
|
|
|
|
|
|
| |
fix docjar tests now it no longer fails with an exception
docJar works again, now mill clean __.docJar && mill __.docJar goes from 413s to 47s on the mill repo
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Transitive reduction of visualized graph via jgrapht now works
```
out/dev/launcher/dest/run -i visualize __.compile _
out/dev/launcher/dest/run -i visualize core.__
```
* Move test running logic from scalaworker into scalalib
This is to try and reduce the size of the classpath we are passing to the test runner subprocess, in an attempt to fix the command-line-too-long errors we're getting in Appveyor. Now the test runner subprocess should no longer need Zinc or all of it's transitive dependencies
* - Break out `GraphvizTools` into a separate Mill module, to avoid bloating the main jar and try to shorten the `MILL_SCALA_WORKER` classpath being sent to scalajslib.test (which is blowing up on windows as the CLI command is too long)
- Move the meat of `resolveDependencies` from `scalalib` to `main`, to support resolving mill modules
- DRY up resolution of mill modules in `Util.millProjectModule`
* fix mill module resolution
* Tweaks to try and make zinc work again...
* Tweak `Module#reflect` to try and make it happy with `visualize` module...
* fix integration test classpath
* move visualization into it's own module
|
|
|