-
-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Turn on parallelism by default, ensure Commands always run serially a…
…t the end (#3265) * Remove the hardcoded setting of `threadCount = Some(1)` * Split `Task`s and `Command`s into two separate batches, to only run `Command`s serially after all `Task`s have run * Introduce a `MILL_TEST_DEST_FOLDER` environment variable in our standard `TestModule`. This is something we needed to do to avoid collisions between parallel test modules in Mill's own build (e.g. everyone stomping over `target/worksources`) and will be something that Mill users will need as well Commands are typically the less well-behaved tasks, whereas Targets and others are meant to be pure functional and thread safe without side effects. So running commands serially at the end is a decent tradeoff the do the right thing by default, and if someone wants parallelism they can always use a task (e.g. `.testCached` instead of `.test`) Commands called from other tasks, e.g. those tested by `example/misc/5-module-run-task`, are run in parallel together with the main group. We assume that these commands are well behaved, as their results will potentially be cached (as part of downstream tasks), and so I run them as part of the primary task graph. (An alternative could have been to run these sequentially as well, but given the nature of commands-run-as-part-of-tasks I think that would be unnecessarily conservative) I disable the thread-number log prefixes in the integration tests, since all they would do there is add clutter. Pull request: #3265
- Loading branch information
Showing
9 changed files
with
144 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.