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
Consider default-members when resolving the binary to run (#477)
# Objective
Fixes#443.
Cargo allows you to use `default-members` to define the default package
to search for binaries in within a workspace.
The Bevy CLI didn't consider this field, resulting in divergent behavior
in comparison to `cargo`. To avoid confusion, we always want to behave
like `cargo` where possible.
# Solution
Now that we use the `cargo_metadata` crate, we can use some helpers to
pick the packages to search the binary in.
We are now respecting the default workspace members.
Note that this also now respects the location where you execute the
command in. If you are located directly in a package, that package is
now picked by default (same as `cargo`) and no longer the other defaults
defined in the workspace.
# Testing
1. Install the CLI from this branch:
```
cargo install --git https://github.com/TheBevyFlock/bevy_cli --branch
443-fix-binary-resulution --locked bevy_cli
```
3. You can use <https://github.com/TimJentzsch/bevy_complex_repo> for
testing, check the new `default_members` workspace. Compare which
package `cargo run` and `bevy run` executes. They should now match up.
0 commit comments