mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-03-02 18:23:24 +01:00
- Remove the JSONRPC connection kind between `TestSourceKitServer` and `SourceKitServer` - It wasn’t actually used and the connection abstraction just made things more complicated than they needed to be - Send requests and notifications to `SourceKitServer` by directly calling into `SourceKitServer.handle` instead of going through a `Connection`. This makes the code a lot easier to understand statically - Make `TestSourceKitServer` conform to `MessageHandler` instead of going through `TestClient` - IMO this centralizes all the handling and makes it a lot easier to follow. `TestClient` didn’t do a whole bunch anyway. - Allow async awaiting of next notifications instead of having to register a `handleNextNotification` handler before expecting the notification to be emitted. - This allows us to remove quite a few `XCTExpectation`s in test cases - Change `sendSync` function that sends a request and returns the result to be `async`