[SE-0362] Piecemeal adoption of upcoming language improvements#59055
Merged
DougGregor merged 4 commits intoswiftlang:mainfrom Jul 20, 2022
Merged
[SE-0362] Piecemeal adoption of upcoming language improvements#59055DougGregor merged 4 commits intoswiftlang:mainfrom
DougGregor merged 4 commits intoswiftlang:mainfrom
Conversation
Member
Author
|
@swift-ci please build toolchain |
605cc71 to
c755369
Compare
Member
Author
|
@swift-ci please smoke test |
Member
Author
|
@swift-ci please smoke test macOS |
Member
Author
|
@swift-ci please smoke test |
Member
Author
|
swiftlang/swift-driver#1118 @swift-ci please build toolchain |
Member
Author
|
@swift-ci please smoke test |
Member
Author
|
Yay it still works, but I need to address the change from |
Introduce the `-enable-upcoming-feature X` command-line argument to allow one to opt into features that will be enabled in an upcoming language mode. Stage in several features this way (`ConciseMagicFile`, `ForwardTrailingClosures`, `BareSlashRegexLiterals`).
When we encounter a check like `#if compiler(>=6.0) && something` or `#if swift(<6.0) || something`, and the left-hand term is a versioning check that determines the result of the whole condition, then we will not attempt to validate the right-hand term. This allows us to use versioned checks along with new discovery features (say, if we add an `#if attribute(x)`) without having to next conditions.
f0c9378 to
2da2561
Compare
c75bb36 to
d693ac3
Compare
Member
Author
|
@swift-ci please smoke test |
Member
Author
|
@swift-ci please test macOS |
Member
Author
|
@swift-ci please smoke test macOS |
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.
Introduce a compiler flag
-enable-upcoming-feature X, which can be used to enable a feature in an earlier language mode (e..g, Swift 5.x) that will be enabled by default in an upcoming language mode (e.g., Swift 6). Available features can be detected with#if hasFeature(X).