feat(toml): allow overriding inherited default-features in 2024 - #17126
Conversation
72f4119 to
62db596
Compare
|
Will we need to update https://doc.rust-lang.org/edition-guide/rust-2024/cargo-inherited-default-features.html as part of this? |
f2f677f to
17595ac
Compare
Yes, I will create a PR for this. |
33ca750 to
1b14f50
Compare
There was a problem hiding this comment.
🔢 Self-check (PR reviewed by myself and ready for feedback)
-
Code compiles successfully
-
Unit tests added
-
No AI-generated elegant nonsense in PR.
-
Comments added where necessary
-
PR title and description updated
-
Documentation updated
-
PR size is reasonable
| - [`default-features`][default-features] (Edition 2024 packages, requires Rust 1.98+): | ||
| Overrides the value set in `[workspace.dependencies]`. | ||
| If neither the package nor the workspace specifies `default-features`, it defaults to `true`. | ||
| Before Rust 1.98, or in earlier editions, package-level `default-features = false` |
There was a problem hiding this comment.
Not sure if this is the perfect word for it, and not sure how detailed we should be here.
e97fffa to
62a3dd8
Compare
|
🔔 This is now entering its final comment period, as per the review above. 🔔 |
|
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. |
|
Looks like some tests need updating |
Impl RFC 3945, on Edition 2024+ allow workspace members to override the workspace dependency's `default-features` setting. Earlier editions are unchanged: setting `default-features` on an inherited dependency is still ignored with a warning. Signed-off-by: 0xPoe <techregister@pm.me>
Signed-off-by: 0xPoe <techregister@pm.me>
`cargo add --no-default-features` (or `--default-features`) against a dependency inherited from `[workspace.dependencies]` is now allowed when the package is on Edition 2024+, matching the manifest behavior. Earlier editions still error, pointing the user to the workspace manifest. Signed-off-by: 0xPoe <techregister@pm.me>
Signed-off-by: 0xPoe <techregister@pm.me>
Signed-off-by: 0xPoe <techregister@pm.me>
Signed-off-by: 0xPoe <techregister@pm.me>
Signed-off-by: 0xPoe <techregister@pm.me>
677fb45 to
945b29c
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Updated. See changes at: #17126 (comment) |
|
Thanks for your review! 💚 💙 💜 💛 ❤️ |
I will handle this tomorrow. |
View all comments
What does this PR try to resolve?
close #16959
Implement RFC 3945, on Edition 2024+ allow workspace members to override the workspace dependency's
default-featuressetting.Earlier editions are unchanged: setting
default-featureson an inherited dependency is still ignored with a warning.Also, this change would allow
cargo add X --no-default-features -p Y, but only on Edition 2024+.How to test and review this PR?
Review and check it commit by commit.
r?@ghost