-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SE-0362] Add enableUpcomingFeature
and enableExperimentalFeature
Swift settings
#5632
Conversation
@swift-ci please test |
@swift-ci please smoke test |
I believe from the code that these flags are being treat as "unsafe", which we didn't want for |
@swift-ci please test |
@swift-ci please smoke test |
Will adding the assignments to |
/// - name: The name of the future feature, e.g., ConciseMagicFile. | ||
/// - condition: A condition that restricts the application of the build | ||
/// setting. | ||
@available(_PackageDescription, introduced: 5.7) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be 999.0
, since this won't make 5.7
values = _values.precedeElements( | ||
with: "-enable-experimental-feature") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think precedeElements(with:)
is needed, if the new APIs are implemented like the existing .define
API, which only stores a single value.
case .enableExperimentalFeature(let value):
values = ["-enable-experimental-feature", value]
switch setting.tool {
Just a friendly ping: Out of curiosity, is this going to be part of 5.8? We plan to prepare all our repos for Swift 6 features now and try to decide whether to wait for a 5.x with this nice feature enabled or whether to use the various other mechanisms to enable them. |
Thanks for the ping! Yes, I plan to get this into 5.8. |
(I still need to rename "future" to "upcoming", per the proposal's review discussion) |
Super, thanks! Then we'll look forward to testing it out and plan accordingly! |
b1d126e
to
0840562
Compare
enableFutureFeature
and enableExperimentalFeature
Swift settingsenableUpcomingFeature
and enableExperimentalFeature
Swift settings
enableUpcomingFeature
and enableExperimentalFeature
Swift settingsenableUpcomingFeature
and enableExperimentalFeature
Swift settings
@swift-ci please test |
@swift-ci please smoke test |
@neonichu how's my implementation look? |
Implement the SwiftPM part of SE-0362 "Piecemeal adoption of upcoming language improvements".