bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#66144: 29.1; eglot-shutdown request params violate JSONRPC


From: Javier Olaechea
Subject: bug#66144: 29.1; eglot-shutdown request params violate JSONRPC
Date: Sat, 14 Oct 2023 11:59:03 -0500

> Yes. What's the matter? What would the "fix" fix?

That is illegal, as in against the JSON-RPC standard, to send a request with `params: null.`. Quoting section 4.2 from the JSON RPC spec linked by OP:

> If present, parameters for the rpc call MUST be provided as a Structured value. Either by-position through an Array or by-name through an Object.

That means in a request object can not have a param key, but if present it must be an Array or an Object.

That said, upon further reflection I think the bug is in json-rpc not eglot.

On Sat, Oct 14, 2023 at 3:59 AM João Távora <joaotavora@gmail.com> wrote:
On Sat, Oct 14, 2023, 09:14 Eli Zaretskii <eliz@gnu.org> wrote:
> From: Javier Olaechea <pirata@gmail.com>
> Date: Sat, 7 Oct 2023 22:42:47 -0500
>
> It seems that eglot used to send an empty object as the params but it got replaced by null to appease
> gopls.
>
> https://github.com/joaotavora/eglot/commit/4f6e152e1c5efc39a888f747ecca313a58f4375e
>
> The fix would be replacing the call
> (jsonrpc-request server :shutdown nil :timeout (or timeout 1.5))
> with
> (jsonrpc-request server :shutdown eglot--{} :timeout (or timeout 1.5))

João, any comments?

Yes. What's the matter? What would the "fix" fix?


--
"I object to doing things that computers can do." — Olin Shivers

reply via email to

[Prev in Thread] Current Thread [Next in Thread]