diff options
author | Li Haoyi <haoyi.sg@gmail.com> | 2017-11-25 12:34:40 -0800 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2017-11-25 12:34:40 -0800 |
commit | f98a88f898f8de10c5145a13792151663f424518 (patch) | |
tree | 4ee797baf8f268dd2772b5c2734c93e96d7871ed /readme.md | |
parent | 2c0ecb9733dfd231c8d16b819d89d515569f104c (diff) | |
download | mill-f98a88f898f8de10c5145a13792151663f424518.tar.gz mill-f98a88f898f8de10c5145a13792151663f424518.tar.bz2 mill-f98a88f898f8de10c5145a13792151663f424518.zip |
Streamline cross-build Scala syntax to avoid the unnecessary `List(...)` wrapper
Diffstat (limited to 'readme.md')
-rw-r--r-- | readme.md | 24 |
1 files changed, 22 insertions, 2 deletions
@@ -56,6 +56,27 @@ Within each `Module` you can define 3 type of task: - `Task`: take arguments, output is not cached; do not run from `bash` (e.g. `def foo = T.task{...}` ) +### Self Hosting + +You can use SBT to build a Mill executable, which itself is able to build more +Mill executables that can you can use to run Mill commands: + +```bash +git clean -xdf + +# Build Mill executable using SBT +sbt scalaplugin/test:assembly + +# Build Mill executable using the Mill executable generated by SBT +scalaplugin/target/mill run Core.assembly + +# Build Mill executable using the Mill executable generated by Mill itself +out/ScalaPlugin/assembly run Core.assembly +``` + +Eventually, as Mill stabilizes, we will get rid of the SBT build entirely and +rely on previous versions of Mill to build itself. + ### Troubleshooting In case of troubles with caching and/or incremental compilation, you can always @@ -98,8 +119,7 @@ able to run it. Cross builds, using the `Cross` data structure, are just another kind of node in the object hierarchy. The only difference is syntax: from the command line you'd run something via `mill run Core.cross[a].printIt` while from code you use -`Core.cross(List("a")).printIt` due to different restrictions in Scala/Bash -syntax. +`Core.cross("a").printIt` due to different restrictions in Scala/Bash syntax. ### Caching by default |