Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some option to run tasks sequentially from the Mill CLI #3898

Open
lefou opened this issue Nov 3, 2024 · 0 comments
Open

Add some option to run tasks sequentially from the Mill CLI #3898

lefou opened this issue Nov 3, 2024 · 0 comments

Comments

@lefou
Copy link
Member

lefou commented Nov 3, 2024

When running Mill from the CLI, it is sometimes desirable to sequentially run some tasks.

Some use cases:

  1. Run a clean build
  2. Run coverage reports after running tests
  3. Do full compilation (instead of incremental compilation) to detect all cyclic dependencies with acyclic compiler plugin

Currently, for all these actions, we need to run Mill multiple times with different tasks. Although this is not big issue, it might be still more convenient to have dedicated support, since a single command is easier to communicate and also all those auxiliary output like out/mill-chrome-profile.json would be more expressive.

I propose the ++ separator for sequentially task dependencies as it nicely matches the already supported + separator to request multiple tasks in parallel.

Example for 1 + 2:

mill clean ++ __.jar + __.testCached ++ scoverage.consoleReportAll

It would first run clean, afterwards it would run all jar and testCached tasks in parallel. And finally, when these are finished, it will generate a Scoverage console report collecting all the test coverage data.

Example for 3:

mill clean __.compile ++ __.compile

It first drops all compile task caches, then runs all compile tasks including its prerequisites.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant