-
Notifications
You must be signed in to change notification settings - Fork 13k
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
x.py clippy: don't run with --all-targets by default #88511
Conversation
src/bootstrap/check.rs
Outdated
if builder.kind != Kind::Clippy { | ||
cargo.arg("--all-targets"); | ||
} |
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.
Hmm, this makes it so it's no longer possible to pass --all-targets to clippy - is that intentional? I agree it doesn't seem super useful, but it seems weird to remove the option altogether ... although I guess you can still add it back with CARGOFLAGS=--all-targets
.
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.
Also, for this step specifically it should just be an early return above, because we've already run on the standard library; this invocation is only for the other targets. The other steps are correct though.
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.
How did that work previously? When I check ./x.py clippy --all-targets
pre-branch, I just get a
Unrecognized option: 'all-targets'
Usage: x.py <subcommand> [options] [<paths>...]
error...
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.
I think at least a comment as to why this isn't being specified is a good idea. We can consider the defaults (or ability to provide it) later.
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.
How did that work previously?
See the changes in https://github.com/rust-lang/rust/pull/88011/files.
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.
Sure, added some comments.
55ef046
to
75ed79a
Compare
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.
75ed79a
to
732f700
Compare
Ah yes, I missed that.
|
732f700
to
e7c15b9
Compare
This comment has been minimized.
This comment has been minimized.
Ok that does not seem to work... 😅 |
@matthiaskrgr I meant here: https://github.com/rust-lang/rust/blob/e7c15b95174e5bc78b51a7887ac9e6db3468d65b/src/bootstrap/check.rs#L114 The idea is to avoid running cargo twice, not to skip it altogether. |
(or in other words, your "handled elsewhere" comment is incorrect) |
this caused a lot of noise because benchmarks and tests were also checked
e7c15b9
to
5538be5
Compare
@jyn514 I think this is ready to be reviewed again..? :) |
Oh sorry, didn't realize this was waiting on me. Could you switch the labels next time? @bors r+ rollup |
📌 Commit 5538be5 has been approved by |
Rollup of 4 pull requests Successful merges: - rust-lang#88257 (Provide more context on incorrect inner attribute) - rust-lang#88432 (Fix a typo in raw_vec) - rust-lang#88511 (x.py clippy: don't run with --all-targets by default) - rust-lang#88657 (Fix 2021 `dyn` suggestion that used code as label) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
this caused a lot of noise because benchmarks and tests were also checked
before:
./x.py clippy |& wc -l
74026
with change:
./x.py clippy |& wc -l
43269
Zulip thread: https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/x.2Epy.20check.20default.20targets
r? @jyn514 or @Mark-Simulacrum