-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
Fix false-positives from target-specific optional features #375
Fix false-positives from target-specific optional features #375
Conversation
Is there a situation where we don't want to look into target-specific dependencies? |
By the way, this change doesn't apply to |
src/rustdoc_gen.rs
Outdated
for target in manifest.parsed.target.values() { | ||
dependencies.extend(target.dependencies.clone().into_iter()); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does enabling target-specific dependencies behave when the target isn't being built?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cargo new targetspecific
cd targetspecific
echo "[target.'cfg(windows)'.dependencies]" >> Cargo.toml
echo 'async-std = { version = "1.6.2", optional = true }' >> Cargo.toml
cargo run --features async-std
It seems to work on a unix machine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like that would be a good test to have in the repo documented specifically for this purpose rather than relying only on the third-party reproductions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 2c2e7c9.
Fixes #369