Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Platform-specific dependencies are not shown #232

Open
gendx opened this issue Jul 5, 2024 · 1 comment
Open

Platform-specific dependencies are not shown #232

gendx opened this issue Jul 5, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@gendx
Copy link

gendx commented Jul 5, 2024

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 :)

@robjtede robjtede added the enhancement New feature or request label Jul 5, 2024
@gendx
Copy link
Author

gendx commented Sep 18, 2024

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.

@gendx gendx changed the title Platform-specific dependencies are not shown Platform-specific dependencies cause an analysis failure for the whole repository Sep 18, 2024
@gendx gendx changed the title Platform-specific dependencies cause an analysis failure for the whole repository Platform-specific dependencies are not shown Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants