Skip to content

[5.6][SourceKit] Disable cancellation of in-flight non-completion requests #42173

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

Conversation

bnbarham
Copy link
Contributor

@bnbarham bnbarham commented Apr 5, 2022

Cherry-picks 7cd4937


We need to run SILGen for diagnostics (to actually get all diagnostics).
All non-completion requests share an AST and thus they too run SILGen.
Any lazy typechecking run in SILGen assumes that it succeeds.

Cancellation can cause typechecking to fail here though, since we simply
check the flag and error if it's set. This unfortunately has the ability
to cause any any number of crashes since various invariants in SILGen
are then broken.

Disable cancellation of in-flight non-completion requests for now until
we have a proper fix in place.

Resolves rdar://91251017.

We need to run SILGen for diagnostics (to actually get all diagnostics).
All non-completion requests share an AST and thus they too run SILGen.
Any lazy typechecking run in SILGen assumes that it succeeds.

Cancellation can cause typechecking to fail here though, since we simply
check the flag and error if it's set. This unfortunately has the ability
to cause any any number of crashes since various invariants in SILGen
are then broken.

Disable cancellation of in-flight non-completion requests for now until
we have a proper fix in place.

Resolves rdar://91251017.
@bnbarham bnbarham requested a review from airspeedswift April 5, 2022 00:32
@bnbarham bnbarham requested a review from a team as a code owner April 5, 2022 00:32
@bnbarham
Copy link
Contributor Author

bnbarham commented Apr 5, 2022

@swift-ci please test

@ahoppen ahoppen changed the title [SourceKit] Disable cancellation of in-flight non-completion requests [5.6][SourceKit] Disable cancellation of in-flight non-completion requests Apr 5, 2022
@ahoppen ahoppen added the r5.6 label Apr 5, 2022
@ahoppen
Copy link
Member

ahoppen commented Apr 5, 2022

@swift-ci Please test macOS

@bnbarham bnbarham merged commit 442f39e into swiftlang:release/5.6 Apr 5, 2022
@bnbarham bnbarham deleted the cherry-disable-cancellation branch April 5, 2022 20:20
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.6 labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants