You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This makes a lot of changes. The basic idea is that clippy cannot depend on the sysroot it is
*built* with to be the same as the sysroot it is *run* with. This assumption is hard-coded in lots
of places throughout clippy, which is why the changes are so extensive.
- Change clippy to use the sysroot of the run compiler (stage1, not stage0-sysroot) when running tests. This fixes an issue where clippy would try to load libraries from the beta compiler, then complain about a version mismatch.
- Change clippy to be able to find host macros. Previously it assumed macros and dependencies were stored in the same target directory, which is not true for stage 0 (macros are in `release`, but other dependencies are in `release/x86_64-unknown-linux-gnu`).
- Don't build rustc twice. The naive way to get dependencies into the stage1/ sysroot is to just compile everything we were doing before with a later compiler, but that takes a very long while to run. Instead:
- Add a new crate in the clippy repo that has only the dependencies needed for UI tests. That allows compiling those crates without also compiling clippy and the whole compiler.
- Don't require `clippy_lints` to be present when running tests in rust-lang/rust. That crate is only used for dogfood lints, which aren't even run in-tree.
- Change various tests to remove usage of `rustc_*` crates. In all cases they were not testing the rustc crates themselves, they just happened to be conveniently in the sysroot.
This currently breaks `--bless` because clippy_dev requires `rustc_lexer`.
I hope to fix this shortly when the "build a single crate" PR lands; this PR is a WIP until then.
0 commit comments