Skip to content

[Distributed] ban typed throws in distributed funcs #78978

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 3 commits into from
Jan 30, 2025

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented Jan 28, 2025

They don't yield a correct error type as we didn't implement it, so rather allow it and risk crashes, ban it until we get the time to implement it.

The real solution is to adjust typed throws error inference to do an union of the thrown error of the func and the type thrown by the distributed actor system remote call -- which today always would be (E | Error) -> Error...

We could add a new associated type to DAS and then we could make it more proper...

resolves rdar://136467528

@ktoso
Copy link
Contributor Author

ktoso commented Jan 28, 2025

@swift-ci please smoke test

They don't yield a correct error type as we didn't implement it, so
rather allow it and risk crashes, ban it until we get the time to
implement it.

The real solution is to adjust typed throws error inference to do an
union of the thrown error of the func and the type thrown by the
distributed actor system remote call -- which today always would be (E |
Error) -> Error...

We could add a new associated type to DAS and then we could make it more
proper...

resolves rdar://136467528
@ktoso ktoso force-pushed the wip-fix-error-type-distributed-throws branch from 7061bc7 to a2b3c48 Compare January 28, 2025 17:07
@ktoso
Copy link
Contributor Author

ktoso commented Jan 28, 2025

@swift-ci please smoke test

@ktoso
Copy link
Contributor Author

ktoso commented Jan 29, 2025

@swift-ci please smoke test macOS

Co-authored-by: Holly Borla <[email protected]>
@ktoso
Copy link
Contributor Author

ktoso commented Jan 29, 2025

@swift-ci please smoke test

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

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

LGTM, we can implement this properly later

@ktoso
Copy link
Contributor Author

ktoso commented Jan 29, 2025

@swift-ci please smoke test

@ktoso ktoso merged commit dee96d9 into swiftlang:main Jan 30, 2025
3 checks passed
@ktoso ktoso deleted the wip-fix-error-type-distributed-throws branch January 30, 2025 11:36
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.

3 participants