cargo icon indicating copy to clipboard operation
cargo copied to clipboard

Cargo check succeeds when it shouldn't

Open oriongonza opened this issue 2 years ago • 2 comments

Problem

Cargo build fails and cargo check suceeds. It gets fixed on cargo clean

Steps

  1. Sometimes cargo check succeeds (in 0.01s) when it shouldn't
  2. Cargo build doesn't work
  3. 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]

oriongonza avatar Dec 05 '23 04:12 oriongonza

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

weihanglo avatar Dec 05 '23 04:12 weihanglo

As I mentioned I have no idea how to reproduce this. It just happens sometimes

oriongonza avatar Dec 05 '23 04:12 oriongonza

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.

weihanglo avatar Jul 30 '24 15:07 weihanglo

Must have been fixed in an update because I stopped getting that error a while ago.

oriongonza avatar Aug 08 '24 06:08 oriongonza