Skip to content

[6.4] Asynchronous Catching Result initializer - #89157

Merged
ktoso merged 1 commit into
swiftlang:release/6.4.xfrom
ktoso:pick-result-async-catching-6.4
May 30, 2026
Merged

[6.4] Asynchronous Catching Result initializer#89157
ktoso merged 1 commit into
swiftlang:release/6.4.xfrom
ktoso:pick-result-async-catching-6.4

Conversation

@ktoso

@ktoso ktoso commented May 15, 2026

Copy link
Copy Markdown
Contributor

Explanation:
Adds init(catching:) with async closure to the Result type.
This was pitched and accepted in swiftlang/swift-evolution#3234

Risk: Low, this is purely additional.

Testing: New test coverage. We'll also tun source compatibility suite.

Original PR: #88465

Reviewed by: @ktoso (original PR by @mattmassicotte)

Issues:
Resolves rdar://102379069

Cherry-pick of swiftlang#88465 (squashed) onto release/6.4.x.

Implements the asynchronous catching `Result.init(catching:)` introduced
in swiftlang/swift-evolution#3234 (SE approved).

The new initializer lives in stdlib/public/Concurrency/Result+AsyncInit.swift
and is `@_alwaysEmitIntoClient` + `nonisolated(nonsending)` with typed throws.

The corresponding stdlib test exercises the new API and is currently gated
off on wasi-wasm32 due to a runtime/IRGen miscompile tracked at
swiftlang#89155.

Original PR: swiftlang#88465
@ktoso
ktoso requested a review from a team as a code owner May 15, 2026 04:41
@ktoso

ktoso commented May 15, 2026

Copy link
Copy Markdown
Contributor Author

@swift-ci please smoke test

@ktoso

ktoso commented May 18, 2026

Copy link
Copy Markdown
Contributor Author

@swift-ci please test

@ktoso

ktoso commented May 26, 2026

Copy link
Copy Markdown
Contributor Author

Depends on #89416

We decided to merge now, and wasm has more time to land a fix later on.

@ktoso
ktoso enabled auto-merge (squash) May 30, 2026 00:47
@ktoso
ktoso disabled auto-merge May 30, 2026 00:48
@ktoso ktoso added concurrency Feature: umbrella label for concurrency language features 🍒 release cherry pick Flag: Release branch cherry picks swift 6.4 labels May 30, 2026
@ktoso
ktoso merged commit cc14ee8 into swiftlang:release/6.4.x May 30, 2026
6 checks passed
@ktoso
ktoso deleted the pick-result-async-catching-6.4 branch May 30, 2026 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

concurrency Feature: umbrella label for concurrency language features 🍒 release cherry pick Flag: Release branch cherry picks swift 6.4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants