From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Javier Olaechea Newsgroups: gmane.emacs.bugs Subject: bug#66144: 29.1; eglot-shutdown request params violate JSONRPC Date: Sat, 14 Oct 2023 15:14:14 -0500 Message-ID: References: <83bkd1sjr1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000d363ed0607b2d1ac" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38389"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 66144@debbugs.gnu.org To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 14 22:14:54 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qrl2E-0009q0-7F for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 Oct 2023 22:14:54 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qrl20-00086u-P5; Sat, 14 Oct 2023 16:14:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qrl1z-00086h-5H for bug-gnu-emacs@gnu.org; Sat, 14 Oct 2023 16:14:39 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qrl1y-0007WD-TG for bug-gnu-emacs@gnu.org; Sat, 14 Oct 2023 16:14:38 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qrl2M-0000aD-BT for bug-gnu-emacs@gnu.org; Sat, 14 Oct 2023 16:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Javier Olaechea Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Oct 2023 20:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66144 X-GNU-PR-Package: emacs Original-Received: via spool by 66144-submit@debbugs.gnu.org id=B66144.16973144992218 (code B ref 66144); Sat, 14 Oct 2023 20:15:02 +0000 Original-Received: (at 66144) by debbugs.gnu.org; 14 Oct 2023 20:14:59 +0000 Original-Received: from localhost ([127.0.0.1]:50607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qrl2J-0000Zh-3q for submit@debbugs.gnu.org; Sat, 14 Oct 2023 16:14:59 -0400 Original-Received: from mail-yw1-x112c.google.com ([2607:f8b0:4864:20::112c]:59805) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qrl2F-0000ZR-Ly for 66144@debbugs.gnu.org; Sat, 14 Oct 2023 16:14:57 -0400 Original-Received: by mail-yw1-x112c.google.com with SMTP id 00721157ae682-579de633419so38939457b3.3 for <66144@debbugs.gnu.org>; Sat, 14 Oct 2023 13:14:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697314466; x=1697919266; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=3tePycsQmhIV50h8VEABd8e7zGzwY9ONfw5c/owO7yM=; b=IFBd8Bic2ACVlqnRNuRcW3Jd5aQXODMGQJ64Jc41ehHoAJf/wyNF5lf1Cq1zcSl3nA yVr4dzXzjPsE6Yjm2WPockWOq77nphxICz1R1jPZpOKTdVCVBecywQsmxoVYDbn6VFEA Q3H6VOuSpPiGDCcvSWf2RMb0fDoMRSyHBHWjiH1FK8diMGoQGRZYhBkOA+4M7qGFLWCW fIM0BiyaIUTZVF17l9GYNqfNLkgYZmZOaUv5+z/17oYAwtRHUpNtBb6vVUepfkZ8Efmn NwkQWOPJsmj4b6YAMvvg5xz6Yr0YEOUOWIPoMV3BHrXTk357tsQjD/OM/k9FAaTMgb79 bBeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697314466; x=1697919266; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3tePycsQmhIV50h8VEABd8e7zGzwY9ONfw5c/owO7yM=; b=JEHskTTTjLEvu9QO7Dn/TBCeYQBxBRA/yJD+UQxcK2tEO9kyUWpdUjpIuSO7JmxCAs imXRSCJzkdhsWzefhLHf+oGb6cXWUqZ3m22kviXdmXOOPJEioUJoHiV99R1192zDcyqJ MwfiK50wCmpzwsIBZ+4ZN4U5bxUKfkniqHVLs9I1cA7nfxqotmkveWf67gIs5zZe/YWo ZmFzgiSpG8aMQfkBewuHnySbv3UZHEt91gXdXWZ2CvUSmHOQPO2mLhln78XvglQQU82D 1nZbroQiM+QrAOWc28cSa/iE5j8BnVWUabZvZ6zclF1NY3FhbBD6u4Jv04Marh/eZKjA SL+g== X-Gm-Message-State: AOJu0YyMPckgMdmMDtM9Nb3OQgM/ohDgbc117WxNuKuDbledNwdQZkLP FP+DJ9seQICiaLL9fxIzvJUJdywoiwPgQ5v+oaY= X-Google-Smtp-Source: AGHT+IFuC8F+g7gmbxq4dCn0i8/b7DGfaW9hmsDK8xfwN8NBrynYy50Xv8TpUiB12lT1FEAn19/momSslHAd+nQDtBE= X-Received: by 2002:a81:5e0a:0:b0:59b:bed9:9a3a with SMTP id s10-20020a815e0a000000b0059bbed99a3amr33188696ywb.41.1697314466127; Sat, 14 Oct 2023 13:14:26 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:272468 Archived-At: --000000000000d363ed0607b2d1ac Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > 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. 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? On Sat, Oct 14, 2023 at 1:30=E2=80=AFPM Jo=C3=A3o T=C3=A1vora wrote: > On Sat, Oct 14, 2023 at 7:02=E2=80=AFPM Jo=C3=A3o T=C3=A1vora wrote: > > > > On Sat, Oct 14, 2023 at 6:19=E2=80=AFPM Javier Olaechea > wrote: > > > > > > > If you can find some Eglot use case that is actually hurt by this, > we can reopen. > > > > > > The OP has an Eglot use case that is hurt by this, they cannot > shutdown the ocamllsp server. Because when they call M-x eglot-shutdown, > eglot sends an invalid request. The server dies instead of returning a > response and then eglot restarts the server. > > > > But what OP? I don't see this message, can you point to it? > > OK, I see the message now. In that case that changes things. > One of the misbehaving servers has to correct itself. I'd say it > should be gopls. > > Unless that has already happened. Can you test gopls shutdowns > with your patch Javier? > > Jo=C3=A3o > --=20 "I object to doing things that computers can do." =E2=80=94 Olin Shivers --000000000000d363ed0607b2d1ac Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> 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 pa= tch applied.

However I think it might be better to modify jsonrpc-re= quest so that when the param argument is nil the JSON serialization omits t= he param key. I'm thinking of using the `,@(when param (list param)) id= iom. 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 s= tandard w/o changing the API. What do you think?

On Sat, Oct 14, 2023 at 1:30=E2=80=AFPM Jo=C3=A3o T=C3=A1vora <<= a href=3D"mailto:joaotavora@gmail.com">joaotavora@gmail.com> wrote:<= br>
On Sat, Oct 14, = 2023 at 7:02=E2=80=AFPM Jo=C3=A3o T=C3=A1vora <joaotavora@gmail.com> wrote:
>
> On Sat, Oct 14, 2023 at 6:19=E2=80=AFPM Javier Olaechea <pirata@gmail.com> wrote:=
> >
> > > If you can find some Eglot use case that is actually hurt by= this, we can reopen.
> >
> > The OP has an Eglot use case that is hurt by this, they cannot sh= utdown the ocamllsp server. Because when they call M-x eglot-shutdown, eglo= t sends an invalid request. The server dies instead of returning a response= and then eglot restarts the server.
>
> But what OP?=C2=A0 I don't see this message, can you point to it?<= br>
OK, I see the message now.=C2=A0 In that case that changes things.
One of the misbehaving servers has to correct itself.=C2=A0 I'd say it<= br> should be gopls.

Unless that has already happened.=C2=A0 Can you test gopls shutdowns
with your patch Javier?

Jo=C3=A3o


--
"I objec= t to doing things that computers can do." =E2=80=94 Olin Shivers
--000000000000d363ed0607b2d1ac--