Skip to content

Commit 442f39e

Browse files
authored
Merge pull request #42173 from bnbarham/cherry-disable-cancellation
[5.6][SourceKit] Disable cancellation of in-flight non-completion requests
2 parents a62c963 + a9e1ff3 commit 442f39e

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
@@ -1050,7 +1050,6 @@ ASTUnitRef ASTBuildOperation::buildASTUnit(std::string &Error) {
10501050
Error = "compilation setup failed";
10511051
return nullptr;
10521052
}
1053-
CompIns.getASTContext().CancellationFlag = CancellationFlag;
10541053
if (CompIns.loadStdlibIfNeeded()) {
10551054
LOG_WARN_FUNC("Loading the stdlib failed");
10561055
Error = "Loading the stdlib failed";

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)