Open
Description
Description
Hello,
I'm currently playing with clippy and trying to build and run it from source. However, I've been hitting intermittent failures when running the built clippy program.
For some context:
- I have a project whose toolchain is pinned at rust version 1.86.0.
- I followed https://doc.rust-lang.org/nightly/clippy/development/basics.html#install-from-source. Specifically, I cloned the rust-clippy repo and checked out the following commit- 3e3715c. I chose this commit because it seemed to be the corresponding commit of rust-clippy for rust 1.86.0.
- The chosen toolchain at this commit points to "nightly-2025-02-06". This also lines up with the info I see for the clippy code embedded in the rust repo itself for 1.86: https://github.com/rust-lang/rust/blob/05f9846f893b09a1be1fc8560e33fc3c815cfecb/src/tools/clippy/rust-toolchain
- I build the project and see the cargo-clippy and clippy-driver executables in /root/.rustup/toolchains/nightly-2025-02-06-aarch64-unknown-linux-gnu/bin
However, when I proceed to my test project's workspace and run cargo clean
and cargo +nightly-2025-02-06 clippy
, I get a slew of errors that look like this
error[E0463]: can't find crate for `tokio`
--> /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/deadpool-runtime-0.1.4/src/lib.rs:54:29
|
54 | Self::Tokio1 => tokio_1::time::timeout(duration, future).await.ok(),
| ^^^^^^^ can't find crate
I turn around and run cargo +nightly-2025-02-06 clippy
again, and this time it passes. I'm wondering if anyone has seen this sort of flappy result before when building from source? Am I mistakenly using a wrong version of clippy that's actually not compatible with my test project's pinned rust version?
Version
test project rust version:
rustc 1.86.0 (05f9846f8 2025-03-31)
binary: rustc
commit-hash: 05f9846f893b09a1be1fc8560e33fc3c815cfecb
commit-date: 2025-03-31
host: aarch64-unknown-linux-gnu
release: 1.86.0
LLVM version: 19.1.7
clippy clone rust version
rustc 1.86.0-nightly (a9730c3b5 2025-02-05)
binary: rustc
commit-hash: a9730c3b5f84a001c052c60c97ed0765e9ceac04
commit-date: 2025-02-05
host: aarch64-unknown-linux-gnu
release: 1.86.0-nightly
LLVM version: 19.1.7
Additional Labels
@rustbot label +C-question