From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Pettersson Newsgroups: gmane.emacs.bugs Subject: bug#66144: 29.1; eglot-shutdown request params violate JSONRPC spec Date: Sat, 10 Aug 2024 00:58:50 +0200 Message-ID: References: <83bkd1sjr1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35683"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Javier Olaechea , 66144@debbugs.gnu.org, Eli Zaretskii , =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 10 00:59:56 2024 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 1scYaQ-000986-6G for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Aug 2024 00:59:54 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1scYa8-0007Rg-JU; Fri, 09 Aug 2024 18:59:36 -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 1scYa7-0007RT-6q for bug-gnu-emacs@gnu.org; Fri, 09 Aug 2024 18:59:35 -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 1scYa6-0002O3-Tz for bug-gnu-emacs@gnu.org; Fri, 09 Aug 2024 18:59:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=EVrVYzY28ARbv7Q68hodmEraI0FpahO6d7jANWa2yKc=; b=bR8juG8VfS/e9AxgyM6xbap9/DTAoMEtNSwKeK9AZEgKcsxcPegqgryuO50GUo3j9ou2cwSE1wAkkjg7U+tLyr2tuGDbUVj67R2WCeu6uCA41YUHk0q/D4cFeDB3bC7teaDwac1L3zSW51uO8k9arq8UItSub41+3OyiPFbyZYNSPAG5/RowPZ2fYy95VbyZoq8Verj4F8gwcLuCcF9CgZDDuwEvLGLTsUUqx2MIEptnnBH02mOkVln8O/zT1StvVdMtWqedZpsg+5yD0sg5aEDYBL04wKm0OkISeYLi170GkfbKY+3n0InuEx2joSxzP2SMOCN15nYe/56Ms1YauA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1scYaY-0008FD-TJ for bug-gnu-emacs@gnu.org; Fri, 09 Aug 2024 19:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daniel Pettersson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Aug 2024 23:00: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.172324436831623 (code B ref 66144); Fri, 09 Aug 2024 23:00:02 +0000 Original-Received: (at 66144) by debbugs.gnu.org; 9 Aug 2024 22:59:28 +0000 Original-Received: from localhost ([127.0.0.1]:38761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1scYa0-0008Dz-I9 for submit@debbugs.gnu.org; Fri, 09 Aug 2024 18:59:28 -0400 Original-Received: from mail-lj1-f173.google.com ([209.85.208.173]:56669) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1scYZy-0008Dj-Tx for 66144@debbugs.gnu.org; Fri, 09 Aug 2024 18:59:27 -0400 Original-Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-2ef2c56da6cso27385331fa.1 for <66144@debbugs.gnu.org>; Fri, 09 Aug 2024 15:58:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723244332; x=1723849132; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=EVrVYzY28ARbv7Q68hodmEraI0FpahO6d7jANWa2yKc=; b=LrhlY0AzuBylFv6NfYRNUWbuDul92IuWtJZ7Qd4JjrwrdEcxJN9B7BG21sP2lv06rX +7G6wCF7JJoyAZ77nVGxCl6CZFglQTgsLW8jNq1whZt90PNdVSvAfuEfNmihRpoBsPQT B5EgOMPyTogQNJmwZVaphumOUH1RMQ5scR/qjc0ZVpneHYBY6fSsBarODF9QUl4MFjZc 2GntzcpqNKY+NwERxXkTouIQtJ6p1/uAFxVSaHiYkeBj6Q6RiI++B241qIUbG2cvgkuv P5o7DGUzbeoQgjmchnHC7BfG5Wa75JoipGOz6DL88DW1/pFoI9/Xg5RpefWRr9vX5phb L4og== X-Forwarded-Encrypted: i=1; AJvYcCXTyYqQ4WWSvplfZPtKo5KWMlpxyLnkToiQrEAabnR4kd954UZplYVqMdOcrYizhkhIS9+MhSAZbuQvrfKxTkuMefLgb04= X-Gm-Message-State: AOJu0Yzz9T2VzBRGapYxqdgkpfCel66KATT4uCniWl4nIyGgAm8dgrVQ n+D8dyS61yjEGemgV7NDxzG8saRvthLVGP1LyWIjNMn8dpxuqfxz X-Google-Smtp-Source: AGHT+IH20utcJcHS5YxFAvK0xnXWDXUf7mpNgRMzUxfmOCfx61k+e3g5ZZPFfeAoaKKRELDPdI33Xg== X-Received: by 2002:a05:6512:224f:b0:52e:be50:9c55 with SMTP id 2adb3069b0e04-530eea2b9a0mr2273685e87.52.1723244331818; Fri, 09 Aug 2024 15:58:51 -0700 (PDT) Original-Received: from Daniels-Air (c-2fc1e455.027-357-6d6c6d4.bbcust.telenor.se. [85.228.193.47]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-53200f1b375sm56182e87.202.2024.08.09.15.58.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Aug 2024 15:58:51 -0700 (PDT) In-Reply-To: (Stefan Kangas's message of "Thu, 25 Jul 2024 00:06:28 -0700") 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:289979 Archived-At: Javier Olaechea writes: > I did sit down twice to read the jsonrpc.el code and understand what > I need to do to make the > change I hoped to. But unfortunately I can't even say I understood > jsonrpc--async-request-1 well > enough.Or even, if that is indeed the function we need to change so > that we don't seed a params As I see it there are two candidates: Modify calls to jsonrpc-connection-send (jsonrpc--async-request-1, jsonrpc-notify, to keep the behavior consistent) such that jsonrpc-connection-send is not called with keyword :params if params is nil. Or make the change in jsonrpc-convert-to-endpoint which makes the behavior part of jsonrpc.el's API. We are already doing some sanitizing here before serialization of a similar character. I think both options are fine, but I would favor the second one. > attribute when params is nil. It seems that we are passing the > params down in multiple arms? Both solution candidates above should account for this. This sort of change does come with some extensive regression testing, as Jo=C3=A3o mentioned.