-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Description
Previously, clippy was using cargo
from PATH
, but since rust-lang/rust-clippy#11944, it now prioritizes checking CARGO
first. We can now set cargo
path into CARGO
and avoid appending it to the PATH
chain.
In the bootstrap, we have this piece of code
rust/src/bootstrap/src/core/builder.rs
Lines 1220 to 1226 in 7f1d08e
// Set PATH to include the sysroot bin dir so clippy can find cargo. | |
// FIXME: once rust-clippy#11944 lands on beta, set `CARGO` directly instead. | |
let path = t!(env::join_paths( | |
// The sysroot comes first in PATH to avoid using rustup's cargo. | |
std::iter::once(PathBuf::from(initial_sysroot_bin)) | |
.chain(env::split_paths(&t!(env::var("PATH")))) | |
)); |
cargo
into PATH
. As indicated by the FIXME note, rust-lang/rust-clippy#11944 wasn't merged at the time. Now that we can do so, set CARGO
instead of PATH
and remove the FIXME note.
Metadata
Metadata
Assignees
Labels
E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)