cargo-udeps icon indicating copy to clipboard operation
cargo-udeps copied to clipboard

Sometimes fails to load save analysis for crates with no dependencies

Open chitoyuu opened this issue 3 years ago • 4 comments

I have a workspace that contains a crate with no dependencies, which is depended on by a few other crates in the same workspace. Running cargo udeps in the workspace sometimes results in the following error:

info: Loading save analysis from "/path/to/target/debug/deps/save-analysis/lib{name_of_crate_without_deps}-{hash}.json"
error: No such file or directory (os error 2)

As an workaround, adding an arbitrary dependency to the problematic crate temporarily resolves the problem, until it's removed. Running cargo clean before cargo udeps does not seem to have any effects.

cargo-udeps is compiled from commit dece8b2. The crates are in edition 2021. I haven't been able to reproduce the problem with a fresh workspace, unfortunately.

chitoyuu avatar Oct 13 '21 21:10 chitoyuu

This started happening consistently to me too. It is also for edition 2021 crates.

tiziano88 avatar Jan 12 '22 18:01 tiziano88

Any steps to consistently reproduce it would be really neat, then I could try to figure out the cause. Thanks!

est31 avatar Jan 13 '22 10:01 est31

For what it's worth, we are also running into this issue as well :(

tzilist avatar Feb 10 '22 07:02 tzilist

we are having the same issue :(

Fraccaman avatar Mar 11 '22 09:03 Fraccaman