mill icon indicating copy to clipboard operation
mill copied to clipboard

Enhance task query to select/exclude cross modules

Open lefou opened this issue 3 months ago • 1 comments

Currently, the task query syntax (https://mill-build.org/mill/cli/query-syntax.html) is based on types. Since modules in Mill are Scala objects, each module has it's own type, so it is already possible to exclude modules from queries, e.g. to run all compile task except of module foo, you can exclude it by name :

> mill resolve __.compile
foo.compile
bar[one].compile
bar[two].compile
bar[three].compile
baz.compile

> mill resolve __:^foo.compile
bar[one].compile
bar[two].compile
baz.compile

It would be nice, to be able to also select/exclude specific cross module like this:

> mill resolve bar[_].compile
bar[one].compile
bar[two].compile
bar[three].compile

> mill resolve bar[_:^two].compile
bar[one].compile
bar[three].compile

lefou avatar Sep 25 '25 07:09 lefou

My specific use case is the need to disable some specific test in CI (https://github.com/com-lihaoyi/mill/pull/5921).

lefou avatar Sep 25 '25 07:09 lefou