From f98a88f898f8de10c5145a13792151663f424518 Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Sat, 25 Nov 2017 12:34:40 -0800 Subject: Streamline cross-build Scala syntax to avoid the unnecessary `List(...)` wrapper --- readme.md | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'readme.md') diff --git a/readme.md b/readme.md index 23a1bff0..ee735f13 100644 --- a/readme.md +++ b/readme.md @@ -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 -- cgit v1.2.3