You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just did a cargo install cargo-watch to update and running cargo watch -c -x "run" from a workspace directory will run the workspaces default-members binary instead.
Workspace Cargo.toml:
[workspace]
default-members = ["foo"]
members = [
"foo",
"bar/baz",
]
If I cd into ./bar/baz and run cargo watch -c -x "run", foo will run. If I run cargo run from the same directory, baz runs.
The text was updated successfully, but these errors were encountered:
Mmm. I'm not sure which way is the expected behaviour.
Context: the behaviour change is because the code that changes the directory was looking for the first parent with a Cargo.toml, and that got changed to read the manifests and find the real cargo root instead.
However, when the code was originally written, workspaces weren't a thing, and the intent was indeed to run from the root. The code was literally named fn cargo_root().
I think remaking the effective behaviour is probably the right thing to do.
I just did a
cargo install cargo-watch
to update and runningcargo watch -c -x "run"
from a workspace directory will run the workspacesdefault-members
binary instead.Workspace
Cargo.toml
:If I
cd
into./bar/baz
and runcargo watch -c -x "run"
,foo
will run. If I runcargo run
from the same directory,baz
runs.The text was updated successfully, but these errors were encountered: