-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 #11409 - Muscraft:default-feat-workspace-dep, r=weihanglo
fix(toml): Add `default-features` to `TomlWorkspaceDependency` In #11329 it was noted that `default-features` is ignored when used in a dependency that inherits from a workspace i.e. ```toml [workspace] members = [] [workspace.dependencies] dep = "0.1" [package] name = "bar" version = "0.2.0" authors = [] [dependencies] dep = { workspace = true, default-features = false } ``` This problem is caused by problems with deserializing a `TomlDependency` and not emitting an unused manifest key correctly. When discussed in a recent Cargo team meeting we felt the best course of action was to allow `default-features = false` when inheriting a dependency, but it does not change actually set `default-features`. It will be used to warn when there is a difference between the definition in `[workspace.dependencies]` and `[dependencies]` i.e. ```toml [package] name = "bar" version = "0.2.0" [dependencies] dep = { workspace = true, default-features = false } [workspace] members = [] [workspace.dependencies] dep = { version = "0.1", default-features = true } ``` This does not entirely resolve the problem with unused manifest keys. A follow up PR and issue will be created to address those concerns. close #11329
- Loading branch information
Showing
2 changed files
with
191 additions
and
0 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