Skip to content

[5.7][SourceKit] Disable cancellation of in-flight non-completion requests #42193

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 1 commit into from
Apr 7, 2022

Conversation

bnbarham
Copy link
Contributor

@bnbarham bnbarham commented Apr 5, 2022

Cherry-picks 7cd4937

Resolves rdar://91418081.


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.

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 19:44
@bnbarham bnbarham requested a review from a team as a code owner April 5, 2022 19:44
@bnbarham
Copy link
Contributor Author

bnbarham commented Apr 5, 2022

@swift-ci please test

@bnbarham bnbarham added the r5.7 label Apr 7, 2022
@bnbarham
Copy link
Contributor Author

bnbarham commented Apr 7, 2022

@swift-ci please test macOS platform

@bnbarham bnbarham merged commit b4b9c5e into swiftlang:release/5.7 Apr 7, 2022
@bnbarham bnbarham deleted the disable-cancellation-5.7 branch April 7, 2022 22:45
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.7 labels Jan 9, 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 swift 5.7
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants