Make x.py clippy download and use beta clippy#106394
Closed
jyn514 wants to merge 5 commits intorust-lang:masterfrom
Closed
Make x.py clippy download and use beta clippy#106394jyn514 wants to merge 5 commits intorust-lang:masterfrom
jyn514 wants to merge 5 commits intorust-lang:masterfrom
Conversation
This was referenced Jan 3, 2023
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.
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Jan 4, 2023
…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`
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Jan 4, 2023
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 :)
bors
added a commit
to rust-lang/rust-clippy
that referenced
this pull request
Jan 12, 2023
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
Member
|
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. |
Member
Author
|
@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.
Collaborator
|
☔ The latest upstream changes (presumably #107297) made this pull request unmergeable. Please resolve the merge conflicts. |
0bb3f5b to
a62dbb4
Compare
a62dbb4 to
da58abc
Compare
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Member
|
I'll take over this PR, so I moved the commits to #107628. |
thomcc
pushed a commit
to tcdi/postgrestd
that referenced
this pull request
May 31, 2023
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 :)
Merged
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 16, 2023
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
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 16, 2023
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-clippydidn't do that, we could avoid those changes.SYSROOTeven if--sysrootis also passed. That allows us to pass the sysroot for build scripts and proc macros, where cargo ignores RUSTFLAGS. (We can't useSYSROOTexclusively because clippy only runs on crates in the workspace, not dependencies.)RUSTC_CLIPPY_IGNORE_BUILD_SCRIPTS_AND_PROC_MACROSenvironment 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-unmarkedto allow usingrustc_privatecrates 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 1has been tested;--stage 0needs the first change (allowingSYSROOTto be set) to land on beta before it will work.Note that this also adds
x clippy --stage 1 -Awarningstox86_64-gnu-llvm-13to 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