Transition out weak feature syntax in an edition #10556
Labels
A-edition-next
Area: may require a breaking change over an edition
A-features
Area: features — conditional compilation
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
S-needs-team-input
Status: Needs input from team on whether/how to proceed.
T-infra
Team: infrastructure
Problem
The difference between
package/feature
andpackage?/feature
syntax is unfortunate as it can be a little confusing and inelegant. Ideally we would have kept the original syntax, but the?
was added to retain backwards compatibility.Proposed Solution
It might be worth considering dropping the
?
syntax in the next edition.package/feature
would behave the same as the?
variant. With the use of toml_edit, it may be possible to enhancecargo fix
in order to automatically updateCargo.toml
to retain backwards compatibility. If the package is optional, then it would rewrite the[features]
table to convert"package/feature"
to"dep:package", "package/feature"
(and also possibly define a feature named"package"
if it doesn't already exist anddep:package
isn't already used).Notes
No response
The text was updated successfully, but these errors were encountered: