Add a string-based initializer for ExperimentalFeatures.#2895
Merged
ahoppen merged 1 commit intoswiftlang:mainfrom Nov 12, 2024
Merged
Add a string-based initializer for ExperimentalFeatures.#2895ahoppen merged 1 commit intoswiftlang:mainfrom
ExperimentalFeatures.#2895ahoppen merged 1 commit intoswiftlang:mainfrom
Conversation
ahoppen
reviewed
Nov 8, 2024
| /// given name, or returns nil if the name is not recognized. | ||
| public init?(name: String) { | ||
| switch name { | ||
| case "referenceBindings": |
Member
There was a problem hiding this comment.
I think these feature names should match the experimental feature name in the compiler, which means that they will need to be manually specified.
Member
Author
There was a problem hiding this comment.
Done. I renamed the existing featureName to documentationDescription to better describe its purpose (and cleaned up a few of those strings), and then reused featureName for the actual name from Features.def.
355d2ce to
461cfcc
Compare
ahoppen
approved these changes
Nov 11, 2024
Member
ahoppen
left a comment
There was a problem hiding this comment.
Just one request for a release notes entry, otherwise LGTM.
|
|
||
| /// Creates a new value representing the experimental feature with the | ||
| /// given name, or returns nil if the name is not recognized. | ||
| public init?(name: String) { |
Member
There was a problem hiding this comment.
Could you add a release note entry for this new method?
Tools (like swift-format) can use this to let users enable experimental features in the parser via interfaces like the command line, without having to handle the translation from string to option set themselves.
461cfcc to
d141151
Compare
Member
Author
|
@swift-ci please test |
ahoppen
approved these changes
Nov 12, 2024
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tools (like swift-format) can use this to let users enable experimental features in the parser via interfaces like the command line, without having to handle the translation from string to option set themselves.