SE-0362: Piecemeal adoption of upcoming language improvements
Piecemeal: 断片的
Title: 言語の新しい機能に対する、段階的な適応
Introduction
- Swift6では、以前のバージョンでは有効にできなかった、breakingchangeな機能がたくさんある。
- Swift6のコンパイラーが出るまで、それらを試せないので、ユーザーは移行がしんどい
- 提案として、"-enable-upcoming-feature X"で、新しいSwift6の"feature X"を有効にできるようになる。
Swift6に向けた、flag
-
SE-0274 "Concise magic file names" (ConciseMagicFile) delayed the semantic change to #file until Swift 6. Enabling this feature changes #file to mean #fileID rather than #filePath.
-
SE-0286 "Forward-scan matching for trailing closures" (ForwardTrailingClosures) delays the removal of the "backward-scan matching" rule of trailing closures until Swift 6. Enabling this feature removes the backward-scan matching rule.
-
SE-0335 "Introduce existential any" (ExistentialAny) delays the requirement to use any for all existentials until Swift 6. Enabling this feature requires any for existential types.
-
SE-0337 "Incremental migration to concurrency checking" (StrictConcurrency) delays some checking of the concurrency model to Swift 6 (with a flag to opt in to warnings about it in Swift 5.x). Enabling this feature is equivalent to -warn-concurrency, performing complete concurrency checking.
-
SE-0352 "Implicitly Opened Existentials" (ImplicitOpenExistentials) expands implicit opening to more cases in Swift 6, because we didn't want to change the semantics of well-formed code in Swift 5.x. Enabling this feature performs implicit opening in these additional cases.
-
SE-0354 "Regex Literals" (BareSlashRegexLiterals) delays the introduction of the /.../ regex literal syntax until Swift 6. Enabling this feature is equivalent to -enable-bare-regex-syntax, making the /.../ regex literal syntax available. If this proposal and SE-0354 are accepted in the same release, -enable-bare-regex-syntax can be completely removed in favor of this approach.
ここで、flagの種類と、有効になるSwiftversionが確認できる。
2024/4/22
[x]UPCOMING_FEATURE(ConciseMagicFile, 274, 6)
[x]UPCOMING_FEATURE(ForwardTrailingClosures, 286, 6)
[x]UPCOMING_FEATURE(StrictConcurrency, 0337, 6)
[x]UPCOMING_FEATURE(BareSlashRegexLiterals, 354, 6)
[x]UPCOMING_FEATURE(DeprecateApplicationMain, 383, 6)
[x]UPCOMING_FEATURE(ImportObjcForwardDeclarations, 384, 6)
[x]UPCOMING_FEATURE(DisableOutwardActorInference, 401, 6)
[x]UPCOMING_FEATURE(IsolatedDefaultValues, 411, 6)
[x]UPCOMING_FEATURE(GlobalConcurrency, 412, 6)
[x]UPCOMING_FEATURE(InferSendableFromCaptures, 418, 6)
[x]UPCOMING_FEATURE(ImplicitOpenExistentials, 352, 6)
[x]UPCOMING_FEATURE(RegionBasedIsolation, 414, 6)
[x]UPCOMING_FEATURE(DynamicActorIsolation, 423, 6)
[x]UPCOMING_FEATURE(MoveOnlyPartialConsumption, 429, 6)