Skip to content

🍒[5.9][Distributed] Report error rather than crash no ad-hoc requirements are implemented #66022

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

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented May 19, 2023

Description: A "very empty" implementation of a distributed actor system, which is missing all implementations of requirements fails to produce diagnostics but instead crashes on an assertion.

This is because we emit errors on the system, and don't proceed to visit nested types. By doing so, we didn't avoid synthesizing code which requires those not present ad-hoc requirements. Instead of emitting a diagnostic in the nested type we attempt to synthesize and hit assertions along the way. The solution is to check if we're able to synthesize or not more correctly.

Risk: Low, only prevents synthesis in a case where it would have crashed while doing synthesis before.
Review by: @DougGregor
Testing: CI testing
Original PR: #66020
Radar: rdar://108995388

@ktoso ktoso requested a review from a team as a code owner May 19, 2023 14:30
@ktoso ktoso added the distributed Feature → concurrency: distributed actor label May 19, 2023
@ktoso ktoso requested review from hborla and DougGregor May 19, 2023 14:30
@ktoso
Copy link
Contributor Author

ktoso commented May 19, 2023

@swift-ci please test

@ktoso ktoso merged commit 4c0e3f7 into swiftlang:release/5.9 May 19, 2023
@ktoso ktoso deleted the pick-wip-distributed-dont-crash-compile-on-empty-systemush branch May 19, 2023 20:05
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