We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2e93309 + 47b1d61 commit 78c59dbCopy full SHA for 78c59db
Sources/SourceKitLSP/Swift/SwiftLanguageServer.swift
@@ -1476,9 +1476,10 @@ extension SwiftLanguageServer {
1476
req.reply(.full(.init(items: diagnostics)))
1477
1478
case .failure(let error):
1479
- let message = "document diagnostic failed \(uri): \(error)"
1480
- log(message, level: .warning)
1481
- return req.reply(.failure(.unknown(message)))
+ // VS Code does not request diagnostics again for a document if the diagnostics request failed.
+ // Since sourcekit-lsp usually recovers from failures (e.g. after sourcekitd crashes), this is undesirable.
+ // Instead of returning an error, return empty results.
1482
+ return req.reply(.full(.init(items: [])))
1483
}
1484
1485
0 commit comments