deps-rs / deps.rs

Keep your dependencies up-to-date
https://deps.rs
Apache License 2.0
424 stars 26 forks source link

Platform-specific dependencies are not shown #232

Open gendx opened 2 months ago

gendx commented 2 months ago

Besides the usual [dependencies], [dev-dependencies] and [build-dependencies] sections, Cargo allows specifying per-platform dependencies with the following syntax:

[target.'cfg(windows)'.dependencies]
foo = "1.2.3"

[target.bar.dev-dependencies]
bar = "4.5.6"

The general syntax is target.*.(dev-|build-)?dependencies, where the middle part * may represent the platform in arbitrarily complex ways (cfg(), custom target, etc.).

Currently, such dependencies are not recognized by deps.rs, see this example Cargo.toml:

[target.'cfg(any(target_os = "android", target_os = "dragonfly", target_os = "freebsd", target_os = "linux"))'.dependencies]
nix = { version = "0.28", features = ["sched"] }

I don't think deps.rs should try to parse the platform part (to report for which platform there are outdated dependencies), but it would be good to report all the target-specific dependencies :)

gendx commented 2 weeks ago

~It looks like it got worse in the last version, as there is now a "Failed to analyze repository" error: https://deps.rs/repo/github/gendx/stv-rs~

~i.e. not only are such dependencies not recognized, but they also make the whole Cargo.toml file fail to parse.~

Nevermind, it looks like it was a temporary glitch. Reverted back to the original issue title.