-
-
Notifications
You must be signed in to change notification settings - Fork 347
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
Re-support parallel evaluation of TestModule.test
command
#3566
Comments
The biggest problem with this change is that now to pass arguments to tests you need to add a |
@lolgab The run commands last and sequentially should be configurable via a CLI option or some other settings. It's already configurable in the evaluator. |
@lolgab you are right that making For demarcating commands, something like Bazel has flags like |
def test
to def testUncached
def test
to def testUncached
to allow __.test
to be parallel?
…nt` to `Task(persistent = true)` (#3617) fixes #3566. Mostly a straightforward implementation of what was discussed. We use `Task.Command(exclusive = true)` to make `console`/`repl`/`clean`/etc. run serially, all other commands should run in parallel. That includes most `test` commands. The name `exclusive` is taken from the Bazel action/target tag with the same meaning: that the tagged action runs alone with no other actions in parallel `Task.Persistent` was changed to `Task(persistent = true)` for consistency, and also for other reasons: the new syntax is more composable, e.g. a user can more easily choose whether they want `persistent = true` or `persistent = false` based on a computed `Boolean` value, and Mill can in future extend it such that we can have `Task(exclusive = true, persistent = true)`, `Task.Command(exclusive = true, persistent = true)`, or other such combinations perhaps with even more flags (e.g. Bazel has a pretty long list https://bazel.build/reference/be/common-definitions#common.tags). To make overload resolution work correctly, I make the first parameter of the `(exclusive = true)` or `(persistent = true)` parameter list `dummy: NamedParameterOnlyDummy.type = NamedParameterOnlyDummy`. This ensures that there is no normal value the user could pass in positionally that would select that overload of `def Command` or `def apply`, and the only way to select it is by passing in `exclusive = true` or `persistent = true` as a named parameter Tested manually by adding `println`s and making sure that `leafSerialCommands` no longer contains test tasks when I run tests in `example/scalalib/basic/1-simple`.
We closed this, without renaming |
def test
to def testUncached
to allow __.test
to be parallel?TestModule.test
command
Otherwise we cannot set
def defaultCommandName
totestCached
, because people who run__.test
will pick up both thefoo.test.testUncached
default command name and also thefoo.test.test
test command.TBH not quite sure what the right thing to do here is
This is a binary incompatible change and will need to go into 0.13.0
The text was updated successfully, but these errors were encountered: