You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #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: #12225
0 commit comments