Skip to content

[6.2][Sema/SILGen] Import ObjC async functions as nonisolated(nonsending) by default #80957

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
merged 5 commits into from
Apr 22, 2025

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Apr 21, 2025

Cherry-pick of #79717


  • Explanation:

    This was discussed as part of SE-0461 proposal. These functions already have special code generation that keeps them in the caller's isolation context, so there is no behavior change here.

  • Main Branch PR: [Sema/SILGen] Import ObjC async functions as nonisolated(nonsending) by … #79717

  • Risk: Low (The change affects only default isolation of the async ObjC declarations, code generation stays the same as do overrides, it should be transparent from the use perspective as nonisolated(nonsending) has a very flexible conversion scheme).

  • Reviewed By: @gottesmm

  • Resolves: rdar://145672343

  • Testing: Added new tests to the test suite.

xedin and others added 5 commits April 21, 2025 11:22
…` by default

These functions already have special code generation that keeps them
in the caller's isolation context, so there is no behavior change here.

Resolves: rdar://145672343
(cherry picked from commit 07bad98)
…to native thunks.

We do not actually hop since we know that

(cherry picked from commit f309d1b)
…ated parameters of a native function.

(cherry picked from commit 61ff4a9)
…d `@objc` async handlers to be `@concurrent

This is behavior pre-SE-0461 which is the safest option instead
of inferring `nonisolated(nonsending)` and changing the calling
convention and foregoing Sendable checking.

(cherry picked from commit c25d2fa)
@xedin xedin added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.2 labels Apr 21, 2025
@xedin xedin requested a review from hborla April 21, 2025 18:30
@xedin xedin requested a review from a team as a code owner April 21, 2025 18:30
@xedin
Copy link
Contributor Author

xedin commented Apr 21, 2025

@swift-ci please test

@xedin xedin merged commit 4093171 into swiftlang:release/6.2 Apr 22, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 6.2
3 participants