-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Tracking issue for restricted feature name syntax. #8813
Copy link
Copy link
Closed
Labels
A-featuresArea: features — conditional compilationArea: features — conditional compilationC-tracking-issueCategory: A tracking issue for something unstable.Category: A tracking issue for something unstable.S-needs-mentorStatus: Issue or feature is accepted, but needs a team member to commit to helping and reviewing.Status: Issue or feature is accepted, but needs a team member to commit to helping and reviewing.S-waiting-on-feedbackStatus: An implemented feature is waiting on community feedback for bugs or design concerns.Status: An implemented feature is waiting on community feedback for bugs or design concerns.
Metadata
Metadata
Assignees
Labels
A-featuresArea: features — conditional compilationArea: features — conditional compilationC-tracking-issueCategory: A tracking issue for something unstable.Category: A tracking issue for something unstable.S-needs-mentorStatus: Issue or feature is accepted, but needs a team member to commit to helping and reviewing.Status: Issue or feature is accepted, but needs a team member to commit to helping and reviewing.S-waiting-on-feedbackStatus: An implemented feature is waiting on community feedback for bugs or design concerns.Status: An implemented feature is waiting on community feedback for bugs or design concerns.
Type
Fields
Give feedbackNo fields configured for issues without a type.
This issue is for tracking a backwards-incompatible change to add new restrictions to the syntax of a feature name.
Historically, Cargo has been extremely permissive for feature names, allowing them to be any string as long as it isn't empty. crates.io has imposed its own limitations on feature names, specifically all characters must be
is_ascii_alphanumeric,-,_, or+.We would like to introduce new syntax to the feature system to introduce new capabilities. For example, prefixes such as
dep:, or the?character for weakly enabling features. However, this extended syntax may conflict with existing feature names if a project is using punctuation or other symbols in their feature names.The new feature name restrictions are:
_._, or most letters),-, or+.This is being initially implemented as a warning with the intent to make it an error sometime in the future.
We do not expect this to be a problem for projects, since crates.io already imposes strict requirements on the feature name syntax. However, for projects that aren't published to crates.io, it may be possible that they will conflict with the new restrictions.
If your project has encountered the new warning, please leave a comment explaining which characters you are using with an example, and an indication if it would be difficult or possible for you to transition to the more restrictive syntax.