Cargo check succeeds when it shouldn't
Problem
Cargo build fails and cargo check suceeds. It gets fixed on cargo clean
Steps
- Sometimes cargo check succeeds (in 0.01s) when it shouldn't
- Cargo build doesn't work
- if cargo clean gets run it works (fails) again
Notes
It's not extremely uncommon lately. I notice because rust-analyzer stops working.
I have no idea why this happens or how to collect more information.
Version
cargo 1.74.0 (ecb9851af 2023-10-18)
release: 1.74.0
commit-hash: ecb9851afd3095e988daaa35a48bc7f3cb748e04
commit-date: 2023-10-18
host: x86_64-unknown-linux-gnu
libgit2: 1.7.1 (sys:0.18.0 vendored)
libcurl: 8.4.0-DEV (sys:0.4.68+curl-8.4.0 vendored ssl:OpenSSL/1.1.1u)
ssl: OpenSSL 1.1.1u 30 May 2023
os: Arch Linux [64-bit]
Could you try getting a minimal set of steps to reproduce? It would help investigate the issue.
Some possibly relevant issues:
- https://github.com/rust-lang/cargo/issues/12896
- https://github.com/rust-lang/cargo/issues/11780
- https://github.com/rust-lang/cargo/issues/11984
As I mentioned I have no idea how to reproduce this. It just happens sometimes
I am going to close this as there is no concrete reproduction for a while. Feel free to opena a new issue when you have a way to reproduce the error. Thank you.
Must have been fixed in an update because I stopped getting that error a while ago.