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
This commit is contained in:
Alex Hoppen
2024-05-23 13:58:54 -07:00
parent c5e29b19fa
commit 00aebd6659

View File

@@ -382,6 +382,7 @@ extension SwiftLanguageService {
keys.enableDiagnostics: 0,
keys.syntacticOnly: 1,
keys.compilerArgs: compileCommand?.compilerArgs as [SKDRequestValue]?,
keys.cancelBuilds: 0,
])
}