Skip to content
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

[6.0] Don't check sendability of witnesses for @preconcurrency conformances #74173

Conversation

DougGregor
Copy link
Member

@DougGregor DougGregor commented Jun 6, 2024

Explanation: When a witness is part of a @preconcurrency conformance, suppress Sendable checking for that witness
Original PR: #74172
Radar/issue: #74057 / rdar://129321010
Reviewed by: @hborla , @ktoso
Risk: Low. Disables some overly-strict checking.

When a witness is part of a `@preconcurrency` conformance, suppress
Sendable checking for that witness because we assume that the caller is
correctly invoking this witness from within the right isolation
domain. This property is dynamically checked.

Fixes swiftlang#74057.
@DougGregor DougGregor requested a review from a team as a code owner June 6, 2024 05:49
@DougGregor DougGregor changed the title Don't check sendability of witnesses for @preconcurrency conformances [6.0] Don't check sendability of witnesses for @preconcurrency conformances Jun 6, 2024
@DougGregor
Copy link
Member Author

@swift-ci please test

@xedin
Copy link
Contributor

xedin commented Jun 6, 2024

The proposal states that @preconcurrency applies only to witness checker and if I remember correctly we didn’t change Sendable checking there on purpose because of that. Do we have to run an amendment to SE-0423 before merging this?

@DougGregor
Copy link
Member Author

The proposal states that @preconcurrency applies only to witness checker and if I remember correctly we didn’t change Sendable checking there on purpose because of that. Do we have to run an amendment to SE-0423 before merging this?

The proposal doesn't state that we retain Sendable checking. Given that the intent of this feature is to work around "the protocol requirement should have been marked with a global actor", I think it's reasonable to interpret it as not doing Sendable that wouldn't happen if the protocol requirement were marked with that global actor.

@DougGregor DougGregor merged commit 90961cd into swiftlang:release/6.0 Jun 7, 2024
5 checks passed
@DougGregor DougGregor deleted the preconcurrency-conformance-no-sendable-6.0 branch June 7, 2024 14:24
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.

None yet

3 participants