-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[CSApply/Distributed] Identify implicitly throwing calls while applying solution #40130
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks a lot @xedin! 💯
0e71a98
to
90b0079
Compare
@swift-ci please clean test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great direction. I think we're going to need to pull more information into the constraint system to get actor-isolation checking working properly for closures when isolation is queried from inside the constraint solver like this; see my comments inline.
It's useful not only inside of isolation checking but in the type-checker as well.
…stributed thunk Make it possible for type-checker to determine whether the given reference in the given context represents a call to a remote distributed actor.
Use newly added `isDistributedThunk` check to determine whether the given call is to a remote distributed actor and if so mark it as implicitly throwing. Resolves: rdar://83610106
…itter This logic cannot live in `ActorIsolationChecker` because all of the relevant information is only accessible through constraint system while applying solutions.
…nger useful `ConstraintSystem` has its own method to determine this.
90b0079
to
70360eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it'll work, thank you!
@swift-ci please clean test |
@swift-ci please test Windows platform |
1 similar comment
@swift-ci please test Windows platform |
Awesome! And CI green everywhere as well now 🥳 |
Calls to distributed actor methods could be pointing to a thunk for remote access,
such thunks are implicitly throwing. Their existence has to be identified early in order
for later steps of solution application to mark context as throwing e.g. implicitly
generated autoclosures for
async let
initializers rely on that to make closure asthrowing when necessary.
Resolves: rdar://83610106