1
0
mirror of https://github.com/helix-editor/helix synced 2024-11-10 10:34:45 +01:00
helix/helix-lsp
Michael Davis 22298434f1
jsonrpc: Skip serializing params if params are None (#5471)
The JSONRPC spec says:

> If present, parameters for the rpc call MUST be provided as a
> Structured value

https://www.jsonrpc.org/specification#parameter_structures

(Where a "Structured value" is elsewhere defined as either a map or
array.)

This change skips the serialization of the `params` field for JSONRPC
method calls and notifications if the `params` field is the `None`
variant. This fixes compatibility with LSP servers which adhere closely
to that part of the spec: `ocamllsp` in the wild.
2023-01-10 18:31:41 +09:00
..
src jsonrpc: Skip serializing params if params are None (#5471) 2023-01-10 18:31:41 +09:00
Cargo.toml build(deps): bump tokio from 1.23.1 to 1.24.1 (#5473) 2023-01-10 08:07:27 +08:00