GNU bug report logs - #66144
29.1; eglot-shutdown request params violate JSONRPC spec

Previous Next

Package: emacs;

Reported by: Aaron Zeng <azeng <at> janestreet.com>

Date: Thu, 21 Sep 2023 21:00:01 UTC

Severity: normal

Found in version 29.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #35 received at 66144 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Javier Olaechea <pirata <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 66144 <at> debbugs.gnu.org
Subject: Re: bug#66144: 29.1; eglot-shutdown request params violate JSONRPC
Date: Sat, 14 Oct 2023 21:32:05 +0100
On Sat, Oct 14, 2023 at 9:14 PM Javier Olaechea <pirata <at> gmail.com> wrote:
>
> > Can you test gopls shutdowns
> with your patch Javier?
>
> I have tested locally with gopls v0.11.0 and M-x
> eglot-shutdown works successfully afaict. Both w/o and
> w/ the patch applied.

Great, then I'd say we should first apply your patch.

> However I think it might be better to modify jsonrpc-request
> so that when the param argument is nil the JSON serialization
> omits the param key. I'm thinking of using the `,@(when param
> (list param)) idiom. jsonrpc has tests. I'd like to give it
> a go this weekend to see if I can come up with an acceptable
> way to have jsonrpc.el conform with the standard w/o changing
> the API. What do you think?

Maybe, but I don't know if it's worth it.  Especially because we
risk that other servers don't like this new behavior in particular.

It's a very risky change IMO.

Anyway, I would like to confirm some things:

* That the JSONRPC standard actually allows this.  I think you've
  done this already, but please double check.

* That the LSP Base Protocol, which is partially re-described in
  the LSP spec also seems to allow this.

* That the Eglot tests pass after this patch.  And ideally test
  this with some major servers, like rust-analyzer, pylsp,
  pyright, etc.

João




This bug report was last modified 168 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.