forked from rust-lang/cargo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#13518 - baby230211:fix/strip-feature-dev-dep,…
… r=epage fix: strip feature dep when dep is dev dep ### What does this PR try to resolve? This change aims to strip features dependencies without a version key to be published. If a dev-dependency is missing the version, it will be stripped from the packaged manifest. The features table may contains the deps in following places. - Target - normal - dev - build - normal-and-dev - normal - dev - build - normal-and-dev ### How should we test and review this PR? See the initial commit, it shows current behavior that will cause error when feature has deps that point to dev_dep and doesn't have a version specified. Title | orignal toml | published toml | ---- | ---- | ---- | Before | feature = ["dev-dep/feature"] <br/> [dev-dependencies] <br/> dev-dep = { .., features: ["feature"] } | feature = ["dev-dep/feature"] <br/> [dev-dependencies] <br/> dev-dep = { .., features: ["feature"] } | After | feature = ["dev-dep/feature"] <br/> [dev-dependencies] <br/> dev-dep = { .., features: ["feature"] } | feature = [] <br/> [dev-dependencies] ``` Fix: rust-lang#12225
- Loading branch information
Showing
3 changed files
with
369 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.