Commit Graph

9 Commits

Author SHA1 Message Date
Alex Hoppen
d0fc00ce98 Format using swift-format
Add `.swift-format` to the repo and format the repo with `swift-format`.

This commit does not add any automation to enforce formatting of sourcekit-lsp in CI. The goal of this commit is to get the majority of source changes out of the way so that the diff of actually enforcing formatting will have fewer changes or conflicts.
2023-10-10 13:44:47 -07:00
Alex Hoppen
66c598430a Remove workaround for SR-16097 to decode Shutdown request
rdar://92254952
2023-01-13 17:04:35 +01:00
Alex Hoppen
20f5387268 Fix a crash on Linux if a ShutdownRequest was sent without params
Workaround for SR-16097 to avoid hitting SR-16095: VSCode will send shutdown requests without a 'params' key. On macOS getting the superDecoder for a non-existent container returns an empty decoder, on Linux it throws `DecodingError.keyNotFound`, causing a crash.

Perform a targeted fix: If we don't have 'params' and the request is a ShutdownRequest, manually create a `ShutdownRequest` without any parameters.

rdar://91288093
2022-04-22 09:47:41 +02:00
Sebastian Fichtner
7a36a51014 Synchronously send error response on message decoding failure (#334)
* Replaces two logs since those don't result in response messages anymore
* Adds a func for sending messages synchronously, to get the two messages out before fatalError
2020-10-16 16:29:46 -07:00
Richard Howell
81c50db7e1 add the workspace/buildTargets request 2019-09-25 14:16:30 -07:00
Richard Howell
3701f6dcd5 pass in message registry instead of singleton 2019-08-15 15:28:19 -07:00
Ben Langmuir
65b98b383c Remove testable imports of LanguageServerProtocolJSONRPC 2019-08-08 22:22:50 -07:00
Ben Langmuir
119b3fa1cb Rename Message -> JSONRPCMessage in preparation for making it public 2019-08-08 22:06:07 -07:00
Ben Langmuir
aabf57a252 Import SourceKit-LSP sources 2018-11-13 15:50:48 -08:00