Skip to content

Commit 25232e8

Browse files
authored
Merge pull request #42166 from bnbarham/disable-cancellation
[SourceKit] Disable cancellation of in-flight non-completion requests
2 parents 9456fa1 + 7cd4937 commit 25232e8

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tools/SourceKit/lib/SwiftLang/SwiftASTManager.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,6 @@ ASTUnitRef ASTBuildOperation::buildASTUnit(std::string &Error) {
10541054
Error = "compilation setup failed";
10551055
return nullptr;
10561056
}
1057-
CompIns.getASTContext().CancellationFlag = CancellationFlag;
10581057
registerIDERequestFunctions(CompIns.getASTContext().evaluator);
10591058
if (TracedOp.enabled()) {
10601059
TracedOp.start(TraceInfo);

unittests/SourceKit/SwiftLang/CursorInfoTest.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,8 @@ TEST_F(CursorInfoTest, CursorInfoMustWaitDueTokenRace) {
417417
EXPECT_EQ(strlen("fog"), Info.Length);
418418
}
419419

420-
TEST_F(CursorInfoTest, CursorInfoCancelsPreviousRequest) {
420+
// Disabled until we re-enable cancellation (rdar://91251055)
421+
TEST_F(CursorInfoTest, DISABLED_CursorInfoCancelsPreviousRequest) {
421422
// TODO: This test case relies on the following snippet being slow to type
422423
// check so that the first cursor info request takes longer to execute than it
423424
// takes time to schedule the second request. If that is fixed, we need to
@@ -467,7 +468,8 @@ TEST_F(CursorInfoTest, CursorInfoCancelsPreviousRequest) {
467468
llvm::report_fatal_error("Did not receive a resonse for the first request");
468469
}
469470

470-
TEST_F(CursorInfoTest, CursorInfoCancellation) {
471+
// Disabled until we re-enable cancellation (rdar://91251055)
472+
TEST_F(CursorInfoTest, DISABLED_CursorInfoCancellation) {
471473
// TODO: This test case relies on the following snippet being slow to type
472474
// check so that the first cursor info request takes longer to execute than it
473475
// takes time to schedule the second request. If that is fixed, we need to

0 commit comments

Comments
 (0)