-
Notifications
You must be signed in to change notification settings - Fork 889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename --all to --workspace? #3911
Comments
Thanks @lnicola, I wasn't aware of the change to For example, when running If the format strategy currently used with |
Sorry, I wasn't aware of what --all did. I went by the help message: --all Format all packages (only usable in workspaces) So I hope you understand my confusion. If it really behaves like you described, I don't think it's worth making any change here. |
No worries! It may still be worth considering a rename, but I just wanted to note some of the other aspects that would need to be weighed against the consistency with cargo's I can see how that message could be confusing, especially that suffix. I believe --all Format all packages and their local path-based dependencies |
@calebcartwright Seems good to me 🙌 |
Filed #3914. |
The `--all` flag in `cargo check/clippy/test` has been deprecated in favor of `--workspace`: rust-lang/cargo#7241. `--all` in `cargo fmt` is retained because it has a little different meaning. From rust-lang/rustfmt#3911: > For example, when running `cargo fmt` in the root directory of a > workspace, `cargo fmt` already formats all of the workspace members. > Running `cargo fmt --all` formats the workspace *plus* any local/path > based dependencies of the packages in that workspace, regardless of > whether those local deps are explicit workspace members.
The `--all` flag in `cargo check/clippy/test` has been deprecated in favor of `--workspace`: rust-lang/cargo#7241. `--all` in `cargo fmt` is retained because it has a little different meaning. From rust-lang/rustfmt#3911: > For example, when running `cargo fmt` in the root directory of a > workspace, `cargo fmt` already formats all of the workspace members. > Running `cargo fmt --all` formats the workspace *plus* any local/path > based dependencies of the packages in that workspace, regardless of > whether those local deps are explicit workspace members.
…128) Just update the cargo commands since `--all` is deprecated. From the help: ``` $ cargo build --help # ... --all Alias for --workspace (deprecated) --workspace Build all packages in the workspace # ... ``` Note that `cargo fmt` does not support the `--workspace` flag and `--all` actually has different semantics to `--workspace` for other cargo commands. Currently, `cargo fmt` already formats all packages in the workspace, the `--all` flag additionally formats packages that are imported via path and are outside of the workspace (see discussion [here](rust-lang/rustfmt#3911)). So, for this PR we also remove the `--all` flag as it superfluous. ### Test plan CI ### Commit History * update --all to --workspace * --all not needed for fmt
Backport done in #4989 |
`--all` argument to `cargo fmt` is not necessary, see rust-lang/rustfmt#3911
* Re-export gloo-utils from gloo * Update contributing instructions `--all` argument to `cargo fmt` is not necessary, see rust-lang/rustfmt#3911
In rust-lang/cargo#7241,
cargo --all
got deprecated in favor of--workspace
. There's less chance of confusion incargo fmt
because there is no `--all-targets, but perhaps it's a good idea to support both for consistency.The text was updated successfully, but these errors were encountered: