Skip to content

[Distributed] whenLocal adoption of typed throws #71439

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 2 commits into from
Feb 10, 2024
Merged

[Distributed] whenLocal adoption of typed throws #71439

merged 2 commits into from
Feb 10, 2024

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented Feb 7, 2024

whenLocal is a "rethrows" and can be expressed using a typed throw now.

resolves rdar://122464127

whenLocal is a "rethrows" and can be expressed using a typed throw now.
@ktoso ktoso added the distributed Feature → concurrency: distributed actor label Feb 7, 2024
@ktoso
Copy link
Contributor Author

ktoso commented Feb 7, 2024

@swift-ci please smoke test

) async rethrows -> T? {
public nonisolated func whenLocal<T: Sendable, E>(
_ body: @Sendable (isolated Self) async throws(E) -> T
) async throws(E) -> T? {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an ABI break. There's a little song-and-dance you can do to maintain ABI. See, e.g., #70971

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Okey so the silgenname, thanks I’ll follow the same pattern 🙏

Copy link
Contributor Author

@ktoso ktoso Feb 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to revive the effort to bring abi compat checking to Distributed but can't figure out how to dump the macos.json equivalent of Concurrency etc as we use in the digester tests 🤔

Meanwhile I fixed this signature: to $s11Distributed0A5ActorPAAE9whenLocalyqd__Sgqd__xYiYaYbKXEYaKs8SendableRd__lF which seems to be right.

 822 sil [available 13.0] [ossa] @$s11Distributed0A5ActorPAAE9whenLocalyqd__Sgqd__xYiYaYbKXEYaKs8SendableRd__lF : $@convention(method) @async <Self where Self : DistributedActor><T where T : Sendable> (@guaranteed @noescape @Sendable @async @callee_guaranteed @substituted <τ_0_0, τ_0_1 where      τ_0_0 : AnyObject> (@sil_isolated @guaranteed τ_0_0) -> (@out τ_0_1, @error any Error) for <Self, T>, @guaranteed Self) -> (@out Optional<T>, @error any Error) {

@ktoso
Copy link
Contributor Author

ktoso commented Feb 9, 2024

@swift-ci please smoke test

@ktoso ktoso merged commit 68eab70 into main Feb 10, 2024
@ktoso ktoso deleted the ktoso-patch-15 branch February 10, 2024 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distributed Feature → concurrency: distributed actor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants