-
Notifications
You must be signed in to change notification settings - Fork 2.6k
refactor: Use clap to suggest alternative argument for unsupported arguments #12529
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
r? @epage (rustbot has picked a reviewer for you, use r? to override) |
91a2faa
to
4f1f342
Compare
This is current blocked on clap-rs/clap#5081. |
This can be worked around on the clap side. We could add to the prelude a |
4f1f342
to
eaa902f
Compare
@epage this is ready for review. Moved some functional tests to UI tests since it makes more sense matching the entire clap output there. |
Blocked on #12539 bumping the version of |
eaa902f
to
a31aaac
Compare
@bors r+ |
refactor: Use clap to suggest alternative argument for unsupported arguments
💔 Test failed - checks-actions |
We don't want to overly match to suggestion help from clap.
a31aaac
to
77da514
Compare
@bors r+ |
☀️ Test successful - checks-actions |
1 similar comment
☀️ Test successful - checks-actions |
👀 Test was successful, but fast-forwarding failed: 422 Changes must be made through a pull request. |
Update cargo 3 commits in 80eca0e58fb2ff52c1e94fc191b55b37ed73e0e4..2cc50bc0b63ad20da193e002ba11d391af0104b7 2023-08-19 00:52:06 +0000 to 2023-08-22 22:43:08 +0000 - config: merge lists in precedence order (rust-lang/cargo#12515) - ci: test `resolver-tests` in a separate job (rust-lang/cargo#12540) - refactor: Use clap to suggest alternative argument for unsupported arguments (rust-lang/cargo#12529) r? ghost
What does this PR try to resolve?
Part of #11702.
This pull request replaces manual errors with clap native
UnknownArgumentValueParser::suggest
to give uses alternative arugments, including--no-fail-fast
for--keep-going
incargo test
andcargo bench
.cargo-vendor vendor
for unsupportedcargo tree
arguments--no-merge-sources
--relative-path
--only-git-deps
--disallow-duplicates
This PR also renames
fn arg_jobs(…)
and friends to more reasonable names.How should we test and review this PR?
Before
After