Skip to content

Fix lib rename#107

Merged
Jake-Shadle merged 6 commits intomainfrom
fix-lib-rename
Apr 1, 2026
Merged

Fix lib rename#107
Jake-Shadle merged 6 commits intomainfrom
fix-lib-rename

Conversation

@Jake-Shadle
Copy link
Copy Markdown
Member

When adding crates to the visit stack based upon a dependent's enabled features, we were pruning crates due to a (IMO bug) oddity of cargo metadata, where the resolved nodes refer to the lib target name rather than the package name, unless the dependent renames it themselves. For 99.99% of crates this doesn't matter as maintainers don't rename their lib targets, but eg. rust-ini renames its lib target to ini which would cause the entire rust-ini crate to be pruned if it was not renamed AND feature gated, eg. config -> ini -> dep:rust-ini -> rust-ini

Resolves: #106

When adding crates to the visit stack based upon a dependent's enabled features, we were pruning crates due to a (IMO bug) oddity of cargo metadata, where the resolved nodes refer to the lib target name rather than the package name, unless the dependent renames it themselves. For 99.99% of crates this doesn't matter, but eg. rust-ini renames its lib target to 'ini' which would cause the entire rust-ini crate to be pruned if it was not renamed AND feature gated, eg. config -> ini -> rust-ini
bytes has a vulnerability, and tame-index nuked reqwest which removes a fuckton of dependencies
@Jake-Shadle Jake-Shadle merged commit 7f461bb into main Apr 1, 2026
8 checks passed
@Jake-Shadle Jake-Shadle deleted the fix-lib-rename branch April 1, 2026 10:04
Jake-Shadle added a commit to EmbarkStudios/cargo-deny that referenced this pull request Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: False negative on license check for transitive dependency

1 participant