-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
loads two different version of core
#77309
Comments
How useful is it to have 64,000 lines of clippy output? Consider using |
@jyn514 Running Additionally, running |
That sounds like it's just broken in general then, those are the errors you get by compiling with |
Yes, I am running |
Ok, I can reproduce this locally. cc @Mark-Simulacrum, it looks like
|
./x.py clippy
does not run to completion./x.py clippy
loads two different version of core
Yeah, this is because clippy isn't being sent through the sysroot shim. I don't myself plan to invest time into fixing this, FWIW, but if someone wants to dig in I would figure out why clippy is behaving differently from rustc itself here. I suspect it's because we're shimming rustc with src/bootstrap/bin/rustc.rs and we need to do the same for clippy. |
@Mark-Simulacrum do you know why this requires a separate binary instead of passing
|
Also that approach won't work anyway, there's no |
Broadly speaking it probably doesn't but a separate binary usually makes things easier. We will want to add that env variable (I am surprised to hear it wasn't added initially), via a cargo patch. |
I'm surprised you say that, I find it makes things a lot more painful because it means you have to set all sorts of env variables if you want to debug an issue.
I found this is because rust/src/bootstrap/bin/rustc.rs Lines 86 to 88 in 5118a51
|
That wasn't actually the issue, clippy is also setting sysroot: https://github.com/rust-lang/rust-clippy/blob/master/src/driver.rs#L354 |
Ok, setting
I'm not sure why clippy is trying to dynamically load std from the sysroot ... @rust-lang/clippy do you know what's going on here? |
For context, this is while running on |
Possibly related: rust-lang/rust-clippy#2874 |
This keeps the sysroot consistent when there are multiple `rustc` programs floating around. Context: rust-lang/rust#77309
…acrum Fix `x.py clippy` I don't think this ever worked. Fixes rust-lang#77309. `--fix` support is a work in progress, but works for a very small subset of `libtest`. This works by using the host `cargo-clippy` driver; it does not use `stage0.txt` at all. To mitigate confusion from this, it gives an error if you don't have `rustc +nightly` as the default rustc in `$PATH`. Additionally, it means that bootstrap can't set `RUSTC`; this makes it no longer possible for clippy to detect the sysroot itself. Instead, bootstrap passes the sysroot to cargo. r? `@ghost`
I am used to
cargo clippy
providing many good hints in other Rust projects. However, the equivalent here (./x.py clippy
) does not complete after around 64,000 lines of output.The output of a single clippy run.
The text was updated successfully, but these errors were encountered: