rust-toolchain
rust-toolchain copied to clipboard
Baffling error with cargo clippy on stable toolchain
For the past few weeks, I've been seeing a pretty baffling issue on a project of mine that uses rust-toolchain. A test that is supposed to run cargo clippy with the stable toolchain is now failing with the following error:
Run cargo +stable clippy -- -D warnings
error: failed to run `rustc` to learn about target-specific information
Caused by:
process didn't exit successfully: `/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/clippy-driver /home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc - --crate-name ___ --print=file-names --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg` (exit status: 1)
--- stdout
___
lib___.rlib
lib___.so
lib___.so
lib___.a
lib___.so
/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu
off
packed
unpacked
___
clippy
debug_assertions
feature="cargo-clippy"
panic="unwind"
proc_macro
target_abi=""
target_arch="x86_64"
target_endian="little"
target_env="gnu"
target_family="unix"
target_feature="fxsr"
target_feature="sse"
target_feature="sse2"
target_has_atomic="[16](https://github.com/boinkor-net/ci-baseline-rust/actions/runs/9437249732/job/25992895919?pr=22#step:6:17)"
target_has_atomic="32"
target_has_atomic="64"
target_has_atomic="8"
target_has_atomic="ptr"
target_os="linux"
target_pointer_width="64"
target_vendor="unknown"
unix
--- stderr
error: error finding Clippy's configuration file: No such file or directory (os error 2)
error: aborting due to 1 previous error
(I'm pretty sure this config file error is a red herring? None of my other repos that use the rust-toolchain action require a config file to run that test.)
I initially assumed that the rust-toolchain action had changed and required the "rustc" component alongside the clippy component, but adding components: clippy,rustc didn't do anything to change the error message. I'm not sure how to debug this further - do you have hints?