-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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: using --release/debug
and --profile
together becomes an error
#13971
Conversation
Is there something this PR is waiting on for why it is a Draft |
Sorry, I thought there would be some documentation that would need to be changed, but it doesn't seem to be there when I looked today. |
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.
Looks good to me. Thanks!
Should we leverage clap's conflict support? We likely would need validation lower level like this. Unsure which style of error messages we'd prefer. fn arg_release(self, release: &'static str) -> Self {
self._arg(
flag("release", release)
.short('r')
+ .conflicts_with("profile")
.help_heading(heading::COMPILATION_OPTIONS),
)
}
...
.arg(flag(
"debug",
"Build in debug mode (with the 'dev' profile) instead of release mode",
- ))
+ ).conflicts_with("profile")) You don't need to put it on |
This sound better and we can remove most of those tests. (maybe leave one for preventing regression?) |
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.
Thanks for the contribution.
Since this turns a warning into a hard error, I would like to schedule the merge after 1.81 nightly is out.
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.
@heisen-li have you considered this option?
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.
Thanks to you guys, I used this suggestion. Regarding tests, I keep a relevant test for each command (rustc
, build
, check
, install
).
@bors r+ Thanks! |
☀️ Test successful - checks-actions |
Update cargo 14 commits in b1feb75d062444e2cee8b3d2aaa95309d65e9ccd..4dcbca118ab7f9ffac4728004c983754bc6a04ff 2024-06-07 20:16:17 +0000 to 2024-06-11 16:27:02 +0000 - Add local registry overlays (rust-lang/cargo#13926) - docs(change): Don't mention non-existent workspace.badges (rust-lang/cargo#14042) - test: migrate binary_name to snapbox (rust-lang/cargo#14041) - Bump to 0.82.0; update changelog (rust-lang/cargo#14040) - tests: Migrate alt_registry to snapbox (rust-lang/cargo#14031) - fix: proc-macro example from dep no longer affects feature resolution (rust-lang/cargo#13892) - chore: Bump cargo-util-schemas to 0.5 (rust-lang/cargo#14038) - chore(deps): update rust crate pulldown-cmark to 0.11.0 (rust-lang/cargo#14037) - fix: remove `__CARGO_GITOXIDE_DISABLE_LIST_FILES` env var (rust-lang/cargo#14036) - chore(deps): update rust crate itertools to 0.13.0 (rust-lang/cargo#13998) - fix(toml): remove `lib.plugin` key support and make it warning (rust-lang/cargo#13902) - chore(deps): update compatible (rust-lang/cargo#13995) - fix: using `--release/debug` and `--profile` together becomes an error (rust-lang/cargo#13971) - fix(toml): Convert warnings that `licence` and `readme` files do not exist into errors (rust-lang/cargo#13921) r? ghost
What does this PR try to resolve?
part of #13629
issue #13629 (comment)