Repository navigation
|
When running Mill from a subdirectory of For example, suppose the monorepo has the following structure: I would like to be able to run commands as follows: $ cd apps/foo
$ mill server.run
# Resolves to apps.foo.server.run
$ cd apps/foo/client
$ mill run
# Resolves to apps.foo.client.runMy understanding is that, with the current behavior, I need to run the fully qualified task from the repository root: $ mill apps.foo.server.runI could implement this with a wrapper script, but I would like to know whether Mill provides a standard or recommended way to achieve this. |
Replies: 1 comment 1 reply
|
I do not think Mill currently has a built-in “resolve targets relative to the shell cwd” mode. Mill can discover/evaluate a build made from So the two practical options are:
mill apps.foo.server.run
mill apps.foo.client.run
mill runto: mill apps.foo.client.runI would keep that wrapper explicit, e.g. Another low-tech option is to add local alias tasks in the nearest If cwd-relative target resolution is important for monorepos, this sounds like a feature request for an explicit flag/config rather than something Mill already standardizes. If this clarifies the current behavior, please mark it as the answer so other monorepo users can find it. |
I do not think Mill currently has a built-in “resolve targets relative to the shell cwd” mode.
Mill can discover/evaluate a build made from
build.millplus nestedpackage.millfiles, but target selectors are still names in the build graph, not filesystem-relative names. In the layout you showed,server.runis a different selector fromapps.foo.server.run; changing intoapps/foodoes not makeapps.fooan implicit prefix.So the two practical options are:
$PWD, converts/to., and prefixes that to the target. For example, froma…