Open
Description
Problem
When using nested-workspaces it's not possible to use the normal xtask
pattern as the xtask
package does not exist in the inner workspace. It would be useful if in the alias we can explicitly specify that it uses this workspace's manifest even if the current-directory is within another one.
Proposed Solution
One idea I had was something similar to how [env]
lets you specify relative = true
, if that were supported for components of the alias then it could be something like:
[alias]
xtask = [
"run",
"--manifest-path",
{ path = "Cargo.toml", relative = true },
"--package=xtask",
"--bin=xtask",
"--"
]
Notes
This is sort of related to #9123, but that cli flag doesn't work for this usecase for two reasons:
- It will still be using the inner-workspace to detect what the "root" is, not the outer one that defines the
.cargo/config.toml
. - It will change the current-working-directory for the command being run, the
xtask
still wants to be able to resolve its own arguments relative to where it's being run from, we just want to change the path used to find the binary to run.