Skip to content

Commit eb27349

Browse files
authored
Merge pull request #1764 from ahoppen/allow-diag-refresh-request
Support `workspace/diagnostic/refresh` request from `TestSourceKitLSPClient`
2 parents edafb12 + 0c37cb3 commit eb27349

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Sources/SKTestSupport/TestSourceKitLSPClient.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,12 @@ package final class TestSourceKitLSPClient: MessageHandler, Sendable {
354354
return (handler, index, handlerAndIsOneShot.isOneShot)
355355
}.first
356356
guard let (requestHandler, index, isOneShot) = requestHandlerIndexAndIsOneShot else {
357+
if Request.self == DiagnosticsRefreshRequest.self {
358+
// Ignore diagnostic refresh requests. This keeps the log a little cleaner than if we return
359+
// methodNotFound.
360+
reply(.success(VoidResponse() as! Request.Response))
361+
return
362+
}
357363
reply(.failure(.methodNotFound(Request.method)))
358364
return
359365
}

0 commit comments

Comments
 (0)