summaryrefslogtreecommitdiff
path: root/scalalib
Commit message (Collapse)AuthorAgeFilesLines
* bump Ammonite versionLi Haoyi2018-10-183-17/+16
|
* Merge branch 'master' of github.com:lihaoyi/millLi Haoyi2018-10-184-5/+13
|\
| * Configure Idea project generator per module (#458)Tobias Roeser2018-10-092-2/+9
| | | | | | | | | | | | | | | | * Sketched how to skip some projects from Idea project generator * Better trait comment * Moved skipIdea flag into JavaModule
| * fix for allowing subgroups of a given staging profile (#441)Brandon Elam Barker2018-10-051-1/+2
| |
| * Re-order `publishAll` arguments to get rarely used `signed` arg out of the wayLi Haoyi2018-09-201-2/+2
| |
* | .Li Haoyi2018-10-184-17/+22
|/ | | | | | 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
* Include scaladoc as part of mill inspect (#435)Li Haoyi2018-09-203-11/+217
|
* Dedicated scalaDoc plugins and options (#433)Guillaume Grossetie2018-09-192-7/+111
| | | | | | * Dedicated scalaDoc plugins and options * Use T{} for consistency
* Remove useless type parameters for {Test,}Evaluator (#416)Guillaume Martres2018-09-155-18/+18
| | | | | | * Remove useless type parameters for {Test,}Evaluator * Update Evaluator.scala
* don't compile hidden files. fixes #402 (#428)Nikolay Tatarinov2018-09-051-1/+2
|
* Fix shutdown hook failures in tests (#422)aosagie2018-09-021-1/+2
| | | | | | * Remove duplication from ClassLoader.create * Prevent closing of context class loader in tests so that shutdown hooks can run
* Fix paths for ivy-style repos in grepJar (#412)Guillaume Martres2018-08-262-4/+8
|
* Update GenIdeaImpl.scalaLi Haoyi2018-08-251-1/+1
|
* Fix incremental compilation when a Scala project depends on a Java project ↵Guillaume Martres2018-08-259-128/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#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.
* more terminology fixesLi Haoyi2018-08-221-1/+1
|
* standardize naming of ScalaWorker/Api/ImplLi Haoyi2018-08-221-2/+2
|
* Better use of forkWorkingDirLi Haoyi2018-08-131-6/+6
|
* move forkWorkingDir from TestModule onto JavaModule so it can apply to ↵Li Haoyi2018-08-131-4/+4
| | | | run/runBackground
* Update JavaModule.scalaLi Haoyi2018-08-121-3/+1
|
* don't pass in entered args from as remoteArgs too (#403)John Duffell2018-08-081-1/+1
|
* Add support for Dotty projects (#397)Guillaume Martres2018-08-057-151/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Make hot compilation 2x faster by properly reusing classloaders (#393)Guillaume Martres2018-07-281-19/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Plugins do not belong on the compiler classpath (#391)Guillaume Martres2018-07-271-17/+3
| | | They will be classloaded by the compiler itself based on -Xplugin.
* Upgrade Zinc and fix over-compilation (#390)Guillaume Martres2018-07-275-11/+18
| | | | | | | | | | | | | | | | | | | | | | | | * 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.
* 0.2.50.2.5Li Haoyi2018-07-221-1/+1
| | | | | | tweak-readme reduce polling frequency of BackgroundWrapper
* add JavaModule#runBackground, to allow a task to kick off processes to run ↵Li Haoyi2018-07-213-0/+108
| | | | in the background that only die when the task is re-run
* add --disable-ticker, handle --color correctly (#379)Anton Sviridov2018-07-142-1/+2
|
* Issue #314; port sbt-updates to mill (#340)Guillaume Galy2018-07-1414-0/+920
| | | | | | | | | | | | | | | | | | | | | | | | | | * Implement basic dependency resolution * Implement basic dependency versions resolution (Maven only) * refactor dependency updates code * add resolution of updated dependencies * remove dependency on locally-built coursier * dependency updates output formatting * Add 'allowPreRelease' option * start adding tests * Add more tests * Add documentation * Cleanup code * rewrite version parser to use fastparse
* Add scala JS version suffix to ivy deps for published JS ivy.xml (#376)Julian Michael2018-06-252-4/+10
|
* Merge branch 'master' of github.com:lihaoyi/millLi Haoyi2018-06-093-5/+5
|\
| * Allow configuration of JavaModule and ScalafmtModule scala workers (#367)aosagie2018-06-082-2/+2
| |
| * Allow configuration of TestRunner's ScalaWorkerModule (#364)aosagie2018-06-062-3/+3
| |
* | avoid duplicating core scala libraries during artifact resolution to fix ↵Li Haoyi2018-06-093-4/+13
|/ | | | https://github.com/lihaoyi/mill/issues/368
* fix #233 add append and exclude rules to assembly (#309)Nikolay Tatarinov2018-06-017-16/+295
| | | | | | | | | | | | | | | | | | | | | | | | * fix #233 add append and exclude rules to assembly * handle existing files and concatenation when file already exists in assembly * add assembly tests for append rules * tests for append patterns * tests for exclude patterns * make append algorithm use single map with fold over classpathIterator * move assembly rules logic to method * move grouping method to Assembly object, make assemblyRules Seq[_] rather than T[Seq[_]] * add test cases for when there are no rules * keep default parameter in createAssembly not to break CI * add one more reference.conf entry to tests
* Improve Intellij Idea support (#351)Olivier Mélois2018-05-304-27/+90
| | | | | | | | | | | | | | | | | | | | | | | | | * Improve Intellij Idea support Improves the Intellij Idea support in various ways : * Cherrypicks the idea conf that needs deleting rather than deleting the whole .idea directory. That directory contains elements of configuration like VCS reference that were annoying to set again every time mill regenerated idea config. * Attempts to retrieve libraries that the build depends on by inspecting the classloader of the top module * Attempts at grouping jars and sources together in order to have both in the same idea files, which appears to give better jump to definition * Hacks the library names for the libraries the build depends on, in order to match Intellij's ammonite support and not show red to the user about the library that has successfuly been resolved. Also allows to jump to the library sources from the magic import. * Remove un-necessary filters * Avoid Agg throwing because of duplicated build libraries * Removing hardcoded version from SBT idea module names
* Check for availability of Java compiler. (#353)Daniel Kullmann2018-05-281-0/+5
| | | | Throws an exception with a sensible error message when the Java compiler is not available.
* Add a `visualize` command to render portions of the build graph as SVG (#349)Li Haoyi2018-05-255-200/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Solves #345 : optional signing (#346)Olivier Mélois2018-05-232-18/+28
| | | | | | | | | | | * Solves 345 : optional signing * Made gpgPassphrase optional for publishing * Added a flag to remove signing of published artifacts altogether * Handle optional value using null as default param better than using empty string as default param.
* Upgrade Ammonite.Robby2018-05-191-1/+1
|
* Fixes #336: pass scalac options to ScalaDoc during docJar stage (#337)Anton Sviridov2018-05-183-3/+36
|
* Add configurable repl options (#333)Sergey Rublev2018-05-181-2/+2
|
* Update ScalaModule.scalaLi Haoyi2018-05-171-1/+1
|
* Update JavaModule.scalaLi Haoyi2018-05-171-1/+1
|
* Fix JavaModuleLi Haoyi2018-05-171-1/+1
|
* Fix JavaModule.scalaLi Haoyi2018-05-171-1/+1
|
* Restrict doc files to *.java/*.scala (#335)Jim Lawson2018-05-172-2/+2
|
* Allow single files in `generatedSources`Li Haoyi2018-05-171-1/+1
|
* fix GenIdeaImpl test modules (#312)Guillaume Galy2018-05-063-5/+12
| | | fix the syntax for the test output and resource folders
* Scalafmt support (#308)Nikolay Tatarinov2018-05-066-0/+241
| | | | | | | | | | | | | | | | | | | | * add scalafmt module, that formats all sources files on every run * scalafmt worker that internally chaches reformatted files * move jvm process call to helper method * use scala 2.12.4 to resolve scalafmt deps; check for config file existence; add quiet flags to scalafmt CLI * make a scalafmt worker a singleton * add tests for scalafmt module * add reformatAll command * tests for reformatAll command * add docs about scalafmt support
* Mark test module as test sources; change sbt module root (#298)Nikolay Tatarinov2018-04-206-7/+40
| | | | | | | | * mark test module as test sources * add test case for test module in GenIdea * fixes #201 change mill project path for sbt and maven tests