mimoo / cargo-dephell

Cargo dephell analyzes the third-party dependencies of a Rust workspace
47 stars 5 forks source link

Unknown target_os in Ring #7

Closed Cogitri closed 3 years ago

Cogitri commented 3 years ago

When trying to use cargo-dephell in a project that has a dep on ring it failswith the following error:

Error while computing package graph: for package 'ring 0.16.19 (registry+https://github.com/rust-lang/crates.io-index)': for dependency 'once_cell', parsing target 'cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "illumos", target_os = "netbsd", target_os = "openbsd", target_os = "solaris"))' failed: invalid cfg() expression: any(target_os = "dragonfly", target_os = "freebsd", target_os = "illumos", target_os = "netbsd", target_os = "openbsd", target_os = "solaris")
                                                                 ^^^^^^^ expected one of `haiku`, `openbsd`, `freebsd`, `redox`, `vxworks`, `uefi`, `emscripten`, `netbsd`, `fuchsia`, `cloudabi`, `wasi`, `solaris`, `cuda`, `dragonfly`, `l4re`, `android`, `macos`, `hermit`, `linux`, `windows`, `unknown`, `ios` here

I suppose maybe updating Cargo already does the trick.

Tried with latest cargo-dephell from crates.io

mimoo commented 3 years ago

we might have to update the cargo guppy version, I assume it comes from there

mimoo commented 3 years ago

do you have a link to the project so that I can try to reproduce?

Cogitri commented 3 years ago

See https://github.com/Cogitri/test-cargo-dephell for a simple example:

git clone https://github.com/Cogitri/test-cargo-dephell
cargo build
cargo-dephell --manifest-path ./Cargo.toml -o analysis_results.html

reproduces the issue for me.

mimoo commented 3 years ago

sorry for the delay, it should work now. Try to reinstall cargo dephell:

cargo install cargo-dephell -f

then try to run your command as:

cargo dephell -o results.html
Cogitri commented 3 years ago

Yup, works now, thanks!