-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Fix incorrect help message #6555
Conversation
The `cargo clean --target` command does not have a default setting, but the command-line help text says it does.
r? @nrc (rust_highfive has picked a reviewer for you, use r? to override) |
I think what it is trying to say is that if you don't specify |
@@ -7,7 +7,7 @@ pub fn cli() -> App { | |||
.about("Remove artifacts that cargo has generated in the past") | |||
.arg_package_spec_simple("Package to clean artifacts for") | |||
.arg_manifest_path() | |||
.arg_target_triple("Target triple to clean output for (default all)") | |||
.arg_target_triple("Target triple to clean output for") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What @ehuss said ^
Perhaps:
.arg_target_triple("Target triple to clean output for") | |
.arg_target_triple("Target triple to clean output for (defaults to all targets)") |
It's confusing to me because it's the only one that specifies the default behavior. It led me to believe that I found what I was looking for when I discovered that I still think it should be removed as the only default behavior explanation, but you can close this PR if you want. |
Looks like there is a cargo/src/cargo/util/command_prelude.rs Lines 133 to 141 in 26232c3
Maybe in this PR we should move the mention of "all" from the description to a call to cargo/src/cargo/util/command_prelude.rs Lines 119 to 121 in 26232c3
|
After thinking about it some more, perhaps it should be removed? So I think I am 👍 on this now. |
Hm, but there is a bit of a bug where |
I think I like @dwijnand’s idea to clarify that the default is for when Would “(normally cleans all targets)” work? It avoids the word default so that there is no confusion over whether the target triple argument has a default. |
@ehuss I might look into that separate bug when I get home. If I can figure it out, I’ll make a PR for it. Shouldn’t be too hard. |
Except it doesn't always clean all targets. The only time it does that is if you don't provide a package (i.e. a bare |
@dwijnand Do you object to merging this as-is, and then following up later with more documentation about how |
Sure, I'm always down for incremental improvements and eagerly landing changes. @bors r+ |
📌 Commit 26232c3 has been approved by |
Fix incorrect help message The `cargo clean --target` command does not have a default setting, but the command-line help text says it does.
☀️ Test successful - checks-travis, status-appveyor |
Update cargo 9 commits in 865cb70106a6b1171a500ff68f93ab52eea56e72..b33ce7fc9092962b0657b4c25354984b5e5c47e4 2019-02-10 15:49:37 +0000 to 2019-02-19 18:42:50 +0000 - Don't retry invalid credentials from git credential helpers (rust-lang/cargo#6681) - Fix some typos in resolver tests (rust-lang/cargo#6682) - Add an unstable option to build proc macros for both the host and the target (rust-lang/cargo#6547) - Test cases proving RUSTC_WRAPPER can be a relative path (rust-lang/cargo#6638) - Add support for Azure DevOps (rust-lang/cargo#6264) - Update docs for removed `patch` restriction. (rust-lang/cargo#6663) - Fix incorrect help message (rust-lang/cargo#6555) - Stabilize Alternative Registries (rust-lang/cargo#6654) - Having a [patch] section when publishing is not an error (rust-lang/cargo#6535)
The
cargo clean --target
command does not have a default setting, but the command-line help text says it does.