Skip to content

Conversation

@brentleyjones
Copy link
Collaborator

This flag is designed with ease of migration in mind. On toolchains that directly support the Swift 6 language mode (none have been released yet), enabling this feature on a target will simply pass -swift-version 6 to the compiler. On older compilers however, it will instead pass the equivalent set of -enable-upcoming-feature flags as defined inside the compiler. This allows code to begin migrating to Swift 6 mode even before they switch to a Swift 6 toolchain.

PiperOrigin-RevId: 629396220
(cherry picked from commit 86f356c , f1765e6, 8065c86, and 3cb393f)

brentleyjones referenced this pull request Oct 15, 2024
… language mode.

This flag is designed with ease of migration in mind. On toolchains that directly support the Swift 6 language mode (none have been released yet), enabling this feature on a target will simply pass `-swift-version 6` to the compiler. On older compilers however, it will instead pass the equivalent set of `-enable-upcoming-feature` flags as defined inside the compiler. This allows code to begin migrating to Swift 6 mode even before they switch to a Swift 6 toolchain.

PiperOrigin-RevId: 629396220
brentleyjones referenced this pull request Oct 15, 2024
…ompilers when using `swift.enable_v6`.

Even in Swift 5.10, `StrictConcurrency` is only an experimental feature: https://github.com/apple/swift/blob/swift-5.10-RELEASE/include/swift/Basic/Features.def#L221

PiperOrigin-RevId: 631028867
brentleyjones referenced this pull request Oct 15, 2024
… language mode

This flag is designed with ease of migration in mind. On toolchains that directly support the Swift 6 language mode (none have been released yet), enabling this feature on a target will simply pass `-swift-version 6` to the compiler. On older compilers however, it will instead pass the equivalent set of `-enable-upcoming-feature` flags as defined inside the compiler. This allows code to begin migrating to Swift 6 mode even before they switch to a Swift 6 toolchain.

PiperOrigin-RevId: 629396220
(cherry picked from commit 86f356c , f1765e6, 8065c86, and 3cb393f)
Signed-off-by: Brentley Jones <github@brentleyjones.com>
@brentleyjones brentleyjones merged commit c523f48 into master Oct 15, 2024
1 check passed
@brentleyjones brentleyjones deleted the bj/swift.enable_v6 branch October 15, 2024 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants