-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[SE-0470] Enable isolated conformances by default #80810
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
Merged
DougGregor
merged 13 commits into
swiftlang:release/6.2
from
DougGregor:enable-se-0470-6.2
Apr 15, 2025
Merged
[SE-0470] Enable isolated conformances by default #80810
DougGregor
merged 13 commits into
swiftlang:release/6.2
from
DougGregor:enable-se-0470-6.2
Apr 15, 2025
Conversation
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
…gnatureImpl This is going to need a proper implementation in the requirement machine. For the moment, provide a slightly-less-broken implementation but leave a test case where we incorrectly accept racey code. (cherry picked from commit 92774e0)
…ngs in Swift 5 (cherry picked from commit e8b3065)
The IsolatedConformances feature moves to a normal, supported feature. Remove all of the experimental-feature flags on test cases and such. The InferIsolatedConformances feature moves to an upcoming feature for Swift 7. This should become an adoptable feature, adding "nonisolated" where needed. (cherry picked from commit 3380331)
(cherry picked from commit 3f1a6c8)
(cherry picked from commit e4f1b62)
(cherry picked from commit f09cdc2)
…ol requirements as Sendable A metatype for an archetype or existential with no (non-marker) protocol requirements cannot, by definition, carry any (isolated) protocol conformances with it, so it's safe to treat such metatypes as Sendable. (cherry picked from commit 8626404)
…ble metatypes The code that determines whether a reference to a static method (that is not a call) assumed that metatypes were always Sendable. This is no longer the case, so update this code to go through the normal Sendable checking on the metatype. (cherry picked from commit 3ed1d6c)
…le metatypes The introduction of non-Sendable metatypes in Swift 6.2 (via SE-0470) will break some existing Swift 6 code. Downgrade concurrency errors involving non-Sendable metatypes to warnings until some future language mode to ease the transition. (cherry picked from commit 95b18d3)
(cherry picked from commit c7c152b)
…rProtocols (cherry picked from commit 53707a1)
…ing possibly-nonsendable metatypes Thank you, Pavel! (cherry picked from commit 88d6304)
@swift-ci please test |
@swift-ci please test |
hborla
approved these changes
Apr 15, 2025
@swift-ci please test source compatibility |
@swift-ci please test Linux |
xedin
approved these changes
Apr 15, 2025
@swift-ci please test macOS |
@swift-ci please test macOS |
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.
Sendable
are now non-Sendable
. The implementation includes logic to downgrade concurrency-related errors due to this issue to warnings, even in Swift 6, to mitigate the source incompatibility this change introduces. However, it is possible that some source incompatibilities were not found in the source-compatibility suite or normal CI.