Add RUSTC_STAGE env var to ./x.py clippy invocation #100492
Closed
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.
I have absolutely no idea if
./x.py clippy
is supposed to be supported or work these days, but it didn't for me, so I figured I'd fix it.Important: #97443 by @asquared31415 deletes this bit of code. I'm not sure if that PR is still alive or not, or if this PR should be discarded in favor of that one, idk, I'm just blindly whacking at infra until it seems to work.
Before this change, when I ran
./x.py clippy
, it told me torustup component add clippy
. This was entirely unhelpful, as I already had clippy installed! So I expanded the error reporting to report the actual error, and it spit this out:So, I added in a
.env("RUSTC_STAGE", stage.to_string())
, and it seems to mostly work now!... until it reaches
Checking stage0 clippy artifacts (x86_64-pc-windows-msvc -> x86_64-pc-windows-msvc)
, at which point it errors out witherror: internal compiler error: compiler\rustc_monomorphize\src\collector.rs:1031:9: no MIR available for DefId(1:6900 ~ std[81ca]::process::{impl#22}::new)
(oh the irony, clippy ICE'ing when it tries to check clippy).In any case, the situation seems better than before, so I figured I'd submit this anyway.