mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[SourceKit] Disable cancellation of in-flight non-completion requests
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.
This commit is contained in:
@@ -417,7 +417,8 @@ TEST_F(CursorInfoTest, CursorInfoMustWaitDueTokenRace) {
|
||||
EXPECT_EQ(strlen("fog"), Info.Length);
|
||||
}
|
||||
|
||||
TEST_F(CursorInfoTest, CursorInfoCancelsPreviousRequest) {
|
||||
// Disabled until we re-enable cancellation (rdar://91251055)
|
||||
TEST_F(CursorInfoTest, DISABLED_CursorInfoCancelsPreviousRequest) {
|
||||
// TODO: This test case relies on the following snippet being slow to type
|
||||
// check so that the first cursor info request takes longer to execute than it
|
||||
// takes time to schedule the second request. If that is fixed, we need to
|
||||
@@ -467,7 +468,8 @@ TEST_F(CursorInfoTest, CursorInfoCancelsPreviousRequest) {
|
||||
llvm::report_fatal_error("Did not receive a resonse for the first request");
|
||||
}
|
||||
|
||||
TEST_F(CursorInfoTest, CursorInfoCancellation) {
|
||||
// Disabled until we re-enable cancellation (rdar://91251055)
|
||||
TEST_F(CursorInfoTest, DISABLED_CursorInfoCancellation) {
|
||||
// TODO: This test case relies on the following snippet being slow to type
|
||||
// check so that the first cursor info request takes longer to execute than it
|
||||
// takes time to schedule the second request. If that is fixed, we need to
|
||||
|
||||
Reference in New Issue
Block a user