Skip to content

Commit 00aebd6

Browse files
committed
Don’t cancel build when closing a document
In SourceKit-LSP, we can get into the following situation: 1. We open A.swift 2. We issue a request for A.swift, the request takes a while to execute 3. The dependencies of A.swift are updated, which causes us to reopen the document in sourcekitd, so that the AST is rebuilt 4. This shouldn’t cause the request from (2) to be cancelled. We should continue executing it and only re-open the document after the request from (2) has finished rdar://127475366
1 parent c5e29b1 commit 00aebd6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Sources/SourceKitLSP/Swift/SwiftLanguageService.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,7 @@ extension SwiftLanguageService {
382382
keys.enableDiagnostics: 0,
383383
keys.syntacticOnly: 1,
384384
keys.compilerArgs: compileCommand?.compilerArgs as [SKDRequestValue]?,
385+
keys.cancelBuilds: 0,
385386
])
386387
}
387388

0 commit comments

Comments
 (0)