-
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
Make x.py clippy download and use beta clippy #106394
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
…bini Allow passing a specific date to `bump-stage0` This allows regenerating `src/stage0.json` on changes to the tool, without needing to hard-code the date in the source. It was useful for rust-lang#106394, which added clippy to the list of required components. r? `@pietroalbini`
Fix a few clippy lints in libtest - Remove unnecessary references and dereferences - Use `.contains` instead of `a <= x && x <= b` - Use `mem::take` instead of `mem::replace` where possible cc rust-lang#106394 :)
Don't pass `--sysroot` twice if SYSROOT is set This is useful for rust-lang/rust to allow setting a sysroot that's *only* for build scripts, different from the regular sysroot passed in RUSTFLAGS (since cargo doesn't apply RUSTFLAGS to build scripts or proc-macros). That said, the exact motivation is not particularly important: this fixes a regression from 5907e91#r1060215684. Note that only RUSTFLAGS is tested in the new integration test; passing --sysroot through `clippy-driver` never worked as far as I can tell, and no one is using it, so I didn't fix it here. Helps with rust-lang/rust#106394. --- changelog: other: `SYSROOT` and `--sysroot` can now be set at the same time [#10149](#10149) <!-- changelog_checked -->
94c4b27
to
0bb3f5b
Compare
Will this provide a way to still run with master/nightly clippy? This has proven valuable a couple of times to find clippy regressions/crashes. |
@matthiaskrgr yes - that's the only thing that currently works right now actually, See https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/clippy.201-1 for the current status, clippy has an ICE that only shows up with debug-assertions enabled and I need #107297 to land before I can test --stage 0. |
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #107297) made this pull request unmergeable. Please resolve the merge conflicts. |
0bb3f5b
to
a62dbb4
Compare
a62dbb4
to
da58abc
Compare
The job Click to see the possible cause of the failure (guessed by this bot)
|
I'll take over this PR, so I moved the commits to #107628. |
Fix a few clippy lints in libtest - Remove unnecessary references and dereferences - Use `.contains` instead of `a <= x && x <= b` - Use `mem::take` instead of `mem::replace` where possible cc rust-lang/rust#106394 :)
x clippy thanks to `@asquared31415` `@albertlarsan68` for all their help, most of this pr is their work note that this also adds x clippy --stage 0 -Awarnings to x86_64-gnu-llvm-15 to make sure it stays working; that won't gate on any clippy warnings, just enforce that clippy doesn't give a hard error. we can't add --stage 1 until clippy fixes its debug assertions not to panic. note that `x clippy --stage 1` currently breaks when combined with download-rustc. unlike the previous prs, this doesn't require changes to clippy (it works by using RUSTC_WRAPPER instead), and supports stage 0 read this commit-by-commit closes rust-lang#107628; see also rust-lang#106394, rust-lang#97443. fixes rust-lang#95988. helps with rust-lang#76495. r? bootstrap
x clippy thanks to `@asquared31415` `@albertlarsan68` for all their help, most of this pr is their work note that this also adds x clippy --stage 0 -Awarnings to x86_64-gnu-llvm-15 to make sure it stays working; that won't gate on any clippy warnings, just enforce that clippy doesn't give a hard error. we can't add --stage 1 until clippy fixes its debug assertions not to panic. note that `x clippy --stage 1` currently breaks when combined with download-rustc. unlike the previous prs, this doesn't require changes to clippy (it works by using RUSTC_WRAPPER instead), and supports stage 0 read this commit-by-commit closes rust-lang#107628; see also rust-lang#106394, rust-lang#97443. fixes rust-lang#95988. helps with rust-lang#76495. r? bootstrap
Rebased + fixed version of #97443.
Builds on #106387. Fixes #95988. Helps with #76495.
This contains two changes to clippy. Both of them are because clippy bypasses the fake rustc shim we set with
RUSTC
; ifcargo-clippy
didn't do that, we could avoid those changes.SYSROOT
even if--sysroot
is also passed. That allows us to pass the sysroot for build scripts and proc macros, where cargo ignores RUSTFLAGS. (We can't useSYSROOT
exclusively because clippy only runs on crates in the workspace, not dependencies.)RUSTC_CLIPPY_IGNORE_BUILD_SCRIPTS_AND_PROC_MACROS
environment variable. This is set for stage 1 and above. It's necessary because we really need the shim for those targets at stage 1:-Z force-unstable-if-unmarked
to allow usingrustc_private
crates in the sysroot. We can't hack this with-Zcrate-attr=feature(rustc_private)
because it won't get passed to proc-macros if we set it through RUSTFLAGS.Only
x clippy --stage 1
has been tested;--stage 0
needs the first change (allowingSYSROOT
to be set) to land on beta before it will work.Note that this also adds
x clippy --stage 1 -Awarnings
tox86_64-gnu-llvm-13
to make sure it stays working; that won't gate on any clippy warnings, just enforce that clippy doesn't give a hard error.r? @jyn514