Update behavior of transpiled async functions for Swift 6.2
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 3.2k
- Forks
- 106
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 1
Description
As of Swift 6.2, nonisolated async functions (i.e. any async function that isn't part of an actor or marked @MainActor) run on their caller's actor by default.
https://github.com/swiftlang/swift-evolution/blob/main/proposals/0461-async-function-isolation.md
We should update the transpiler so that the suspend functions we generate for nonisolated async Swift functions do not dispatch unless the Swift uses the @concurrent attribute. We can then remove the // SKIP @nodispatch directive.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Swift Evolution proposal linked in the issue, then locate the transpiler entry point that generates suspend functions for nonisolated async Swift functions. Verify the current handling of // SKIP @nodispatch and compare it with @concurrent; done means nonisolated functions do not dispatch by default while @concurrent functions still do, with the directive removable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100