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

Cargo geiger doesnt take into account [[bin]] and [lib] properties in Cargo.toml

Open najamelan opened this issue 2 years ago • 2 comments

I have a library that does not live in "/src/lib.rs" and cargo-geiger chokes with:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Io(Os { code: 2, kind: NotFound, message: "No such file or directory" }, "/<redacted>/src/lib.rs")', /home/<redacted>/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-geiger-0.11.2/src/scan/default.rs:106:59

Also passing the library name as parameter to the --package flag does not help.

ps: After running cargo clean the problem is resolved. I have a shared target directory with CARGO_TARGET_DIR pointing to a ramdisk. That seems to provoke this. Feel free to close if that is not supported behavior.

najamelan avatar Apr 29 '22 11:04 najamelan

Good catch - Feel free to send a PR - would be very welcome - Thanks :)

This whole thing is rewritten for 0.12 though but bug fix for current 0.11 is welcome too if you are up to it

pinkforest avatar May 04 '22 04:05 pinkforest

cargo clean resolved the issue for me as well, thank you.

kellytk avatar Aug 05 '22 01:08 kellytk