From: Javier Olaechea <pirata@gmail.com>
To: "João Távora" <joaotavora@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, 66144@debbugs.gnu.org
Subject: bug#66144: 29.1; eglot-shutdown request params violate JSONRPC
Date: Sat, 14 Oct 2023 11:59:03 -0500 [thread overview]
Message-ID: <CAFVS=zC3QyqQj6Nuq+6rVJEiV62P_zaCKgQCVofakqox-rRowg@mail.gmail.com> (raw)
In-Reply-To: <CALDnm51bEn4KiPP0GgU_4uJxHz+vpZBdd7Vj5p_h9RTesuKUyg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1404 bytes --]
> 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
[-- Attachment #2: Type: text/html, Size: 2659 bytes --]
next prev parent reply other threads:[~2023-10-14 16:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-21 20:59 bug#66144: 29.1; eglot-shutdown request params violate JSONRPC spec Aaron Zeng
2023-10-08 3:42 ` bug#66144: 29.1; eglot-shutdown request params violate JSONRPC Javier Olaechea
2023-10-14 8:14 ` Eli Zaretskii
2023-10-14 8:59 ` João Távora
2023-10-14 16:59 ` Javier Olaechea [this message]
2023-10-14 17:13 ` João Távora
2023-10-14 17:19 ` Javier Olaechea
2023-10-14 18:02 ` João Távora
2023-10-14 18:33 ` João Távora
2023-10-14 20:14 ` Javier Olaechea
2023-10-14 20:32 ` João Távora
2023-10-14 22:54 ` Javier Olaechea
2024-02-02 7:42 ` bug#66144: 29.1; eglot-shutdown request params violate JSONRPC spec Stefan Kangas
2024-02-04 4:15 ` Javier Olaechea
2024-07-25 7:06 ` Stefan Kangas
2024-08-09 22:58 ` Daniel Pettersson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFVS=zC3QyqQj6Nuq+6rVJEiV62P_zaCKgQCVofakqox-rRowg@mail.gmail.com' \
--to=pirata@gmail.com \
--cc=66144@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=joaotavora@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).