From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: David Ventimiglia Newsgroups: gmane.emacs.bugs Subject: bug#59826: additional info Date: Mon, 5 Dec 2022 14:27:31 -0800 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="0000000000001ae39105ef1c3293" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3414"; mail-complaints-to="usenet@ciao.gmane.io" To: 59826@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 05 23:28:24 2022 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 1p2Jwk-0000fW-LE for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Dec 2022 23:28:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p2JwW-0002Ia-R7; Mon, 05 Dec 2022 17:28:08 -0500 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 1p2JwQ-0002I8-TN for bug-gnu-emacs@gnu.org; Mon, 05 Dec 2022 17:28:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p2JwQ-0004hg-L0 for bug-gnu-emacs@gnu.org; Mon, 05 Dec 2022 17:28:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p2JwQ-0002Lg-G6 for bug-gnu-emacs@gnu.org; Mon, 05 Dec 2022 17:28:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: David Ventimiglia Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Dec 2022 22:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59826 X-GNU-PR-Package: emacs Original-Received: via spool by 59826-submit@debbugs.gnu.org id=B59826.16702792719021 (code B ref 59826); Mon, 05 Dec 2022 22:28:02 +0000 Original-Received: (at 59826) by debbugs.gnu.org; 5 Dec 2022 22:27:51 +0000 Original-Received: from localhost ([127.0.0.1]:38764 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2JwE-0002LR-Dx for submit@debbugs.gnu.org; Mon, 05 Dec 2022 17:27:50 -0500 Original-Received: from mail-oi1-f170.google.com ([209.85.167.170]:40741) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p2JwC-0002LL-8y for 59826@debbugs.gnu.org; Mon, 05 Dec 2022 17:27:49 -0500 Original-Received: by mail-oi1-f170.google.com with SMTP id q83so1248262oif.7 for <59826@debbugs.gnu.org>; Mon, 05 Dec 2022 14:27:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=neptunestation-com.20210112.gappssmtp.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=kik8ICz/SbtSg6XPCUUy0gKiCmeNyN/PJuTtHzxxJWQ=; b=4OrmLmaeiOWD9YnTCaUVEaALT9hk2t/d1o6Rk51rExPT1So5RZqaEPppkjDXP0+rvU Y4Ku8zT/0SWVKBpC5VVN9sz3eo+Op++/Lac1L7OQGSXn77AHPzUY+vUXM0kBZWHJX9fp ulZxRtIgD3HnHtadFbyEJchkUxO3WnxivAMAWv4hrqPieUgOUsXkhi6Emef6F+u887xr 0g7XGDiXBwGHdBW3TA4IV3KW9uwajxYmDLchSp7ctWhHwyy1F0e413nGoxgdu0rivVe9 kmdoQZYOzwv8COIkI0B2HtzzaMbMmfB7D0KvefEKmD+fNkM7yh7JROtLfuws67TkHLHj lDdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=kik8ICz/SbtSg6XPCUUy0gKiCmeNyN/PJuTtHzxxJWQ=; b=3P8X6PyK1YDC9txDAIajg2nqMfBotOQntR8QcqK71wcLwKe7wUbzTSZf/lzsty3+23 khK1prFMF9qN/HGOdhDcEtX5MX6yiYbmUPT0s4X37dQ1Fw6Iob40/OjH3Ip2L9H2tpAC s6lzKCRC1FFsmunk/NM0L6P0uKxj9Mc9M+KkXP/s7QFzazrRZAdCP93xq25BJoG5sfiS nzEsX/JS3OvNF3uFo7ck+SmDUwpxsSiAhCuS2fD8dCPbYtKKYqPTmVM9SEyqIciMTqro ngDOpSPGIXl2FJd9yvH2MmalhnhbSNa+u83FWB8xpA6kZbqnMXdCipcac2dutYn11UHB hAbw== X-Gm-Message-State: ANoB5pl04cL0bJ6oiP0DVvCj40pWKoAcNjLlzk24zDe0fn3BNXf2Xv1K wxwehsue7eeBuY6S4I0TLKO4ZAVKrSm9oYJ/mHefEm+LHJHQX8GR X-Google-Smtp-Source: AA0mqf4s5uCXHbwYCGRzIcFURdaz12Yycpk9ILVpyTGFr2OrnIOmNZQP5br63I3VXqMGItCxGhN4ByE2MA8bG2rBVLI= X-Received: by 2002:a05:6808:1818:b0:35a:6cfb:f03b with SMTP id bh24-20020a056808181800b0035a6cfbf03bmr31725416oib.58.1670279262274; Mon, 05 Dec 2022 14:27:42 -0800 (PST) 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:250074 Archived-At: --0000000000001ae39105ef1c3293 Content-Type: multipart/alternative; boundary="0000000000001ae38f05ef1c3291" --0000000000001ae38f05ef1c3291 Content-Type: text/plain; charset="UTF-8" Taking an example Java servlet file ProtonServlet.java, when I add an unused import there's an event like this: [server-notification] Sun Dec 4 12:01:33 2022: (:jsonrpc "2.0" :method "textDocument/publishDiagnostics" :params (:uri "file:///home/neptunestationorg/Work/GitHub/ProtonChamber/src/main/java/org/protonchamber/ProtonServlet.java" :diagnostics [(:range (:start (:line 3 :character 7) :end (:line 3 :character 15)) :severity 2 :code "268435844" :source "Java" :message "The import java.sql is never used" :tags [1])])) That makes sense. When I delete the unused import, there's an event like this: That also makes sense, as it seems to be that the server is publishing an empty list of diagnostics for this file. Nevertheless, the flymake-show-project-diagnostics buffer still has this entry: ProtonServlet.java 4 8 warning n Java [268435844]: The import java.sql is never used Also, I see that sometimes warnings are supplied by one back-end, but then when I fix the issue the same warning is then provided by a different back-end. Here's what I mean. I have another file with an unused import for java.sql. When I do, the diagnostics buffer shows an entry from the e-f-b back-end, which I take to be the "eglot-flymake-backend": SQLServlet.java 4 7 warning e-f-b Java [268435844]: The import java.sql is never used If I delete the offending line, the diagnostics buffer replaces that with this: SQLServlet.java 4 8 warning n Java [268435844]: The import java.sql is never used I don't know what the n back-end is, but evidently it's publishing its own diagnostic for this code 268435844 which somehow is shadowed by the same diagnostic for the same code from the e-f-b back-end. When the e-f-b back-end correctly publishes an empty diagnostic report for this file, the diagnostic report from the n back-end becomes revealed. Or something like that. Finally, I was sent a patch, which is attached. When applied, that seemed to fix the issue. --0000000000001ae38f05ef1c3291 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Taking an example Java servlet file ProtonServlet.java, wh= en I add an unused import there's an event like this:

[server-notification] Sun Dec =C2=A04 12:01:33 2022:
<= div>(:jsonrpc "2.0" :method "textDo= cument/publishDiagnostics" :params
=C2=A0(:uri "file:///home/neptunestationorg/Work/GitHub/Proto= nChamber/src/main/java/org/protonchamber/ProtonServlet.java" :diagnost= ics
[(:range
<= font face=3D"monospace"> =C2=A0(:start
=C2=A0 (:line 3 :character 7)
=C2=A0 :end
=C2=A0 = (:line 3 :character 15))
=C2= =A0:severity 2 :code "268435844" :source "Java" :messag= e "The import java.sql is never used" :tags
=C2=A0[1])]))

That makes sense. When I delete the unused import, there's an e= vent like this:

That also makes sense, as it s= eems to be that the server is publishing an empty list of diagnostics for t= his file. Nevertheless, the flymake-show-project-diagnostics buffer still h= as this entry:

ProtonServlet.java =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A04 =C2=A0 8 warning =C2=A0n =C2=A0 =C2=A0 = =C2=A0 =C2=A0Java [268435844]: The import java.sql is never used

Also, I see that sometimes warnings are = supplied by one back-end, but then when I fix the issue the same warning is= then provided by a different back-end. Here's what I mean. I have anot= her file with an unused import for java.sql. When I do, the diagnostics buf= fer shows an entry from the e-f-b back-end, which I take to be the "eg= lot-flymake-backend":

SQLServlet.java =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 4 =C2=A0 7 warning =C2=A0e-f-= b =C2=A0 =C2=A0Java [268435844]: The import java.sql is never used

If I delete the offending line, the di= agnostics buffer replaces that with this:

SQLServlet.java =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = 4 =C2=A0 8 warning =C2=A0n =C2=A0 =C2=A0 =C2=A0 =C2=A0Java [268435844]: The= import java.sql is never used

I don't know what the n back-end is, but evidently it's publishing= its own diagnostic for this code 268435844 which somehow is shadowed by th= e same diagnostic for the same code from the e-f-b back-end. When the e-f-b= back-end correctly publishes an empty diagnostic report for this file, the= diagnostic report from the n back-end becomes revealed. Or something like = that.

Finally, I was sent a patch, which is at= tached.=C2=A0 When applied, that seemed to fix the issue.
--0000000000001ae38f05ef1c3291-- --0000000000001ae39105ef1c3293 Content-Type: text/x-patch; charset="US-ASCII"; name="eglot.patch" Content-Disposition: attachment; filename="eglot.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lbbd3sie0 LS0tIGEvbGlzcC9wcm9nbW9kZXMvZWdsb3QuZWwKKysrIGIvbGlzcC9wcm9nbW9kZXMvZWdsb3Qu ZWwKQEAgLTIwNDgsOSArMjA0OCwxMSBAQCBlZ2xvdC1oYW5kbGUtbm90aWZpY2F0aW9uCiAgICAg ICAgICAgICAgICAgICAgICh0ICAgICAgICAgICdlZ2xvdC1ub3RlKSkpCiAgICAgICAgICAgICAo bWVzcyAoc291cmNlIGNvZGUgbWVzc2FnZSkKICAgICAgICAgICAgICAgKGNvbmNhdCBzb3VyY2Ug KGFuZCBjb2RlIChmb3JtYXQgIiBbJXNdIiBjb2RlKSkgIjogIiBtZXNzYWdlKSkpCi0gICAgKGlm LWxldCAoKGJ1ZmZlciAoZmluZC1idWZmZXItdmlzaXRpbmcgKGVnbG90LS11cmktdG8tcGF0aCB1 cmkpKSkpCisgICAgKGlmLWxldCogKChwYXRoIChleHBhbmQtZmlsZS1uYW1lIChlZ2xvdC0tdXJp LXRvLXBhdGggdXJpKSkpCisgICAgICAgICAgICAgIChidWZmZXIgKGZpbmQtYnVmZmVyLXZpc2l0 aW5nIHBhdGgpKSkKICAgICAgICAgKHdpdGgtY3VycmVudC1idWZmZXIgYnVmZmVyCiAgICAgICAg ICAgKGNsLWxvb3AKKyAgICAgICAgICAgaW5pdGlhbGx5IChhc3NvYy1kZWxldGUtYWxsIHBhdGgg Zmx5bWFrZS1saXN0LW9ubHktZGlhZ25vc3RpY3MgIydzdHJpbmc9KQogICAgICAgICAgICBmb3Ig ZGlhZy1zcGVjIGFjcm9zcyBkaWFnbm9zdGljcwogICAgICAgICAgICBjb2xsZWN0IChlZ2xvdC0t ZGJpbmQgKChEaWFnbm9zdGljKSByYW5nZSBjb2RlIG1lc3NhZ2Ugc2V2ZXJpdHkgc291cmNlIHRh Z3MpCiAgICAgICAgICAgICAgICAgICAgICAgIGRpYWctc3BlYwpAQCAtMjA5Myw3ICsyMDk1LDYg QEAgZWdsb3QtaGFuZGxlLW5vdGlmaWNhdGlvbgogICAgICAgICAgICAgICAgICAgICAgICAgICh0 CiAgICAgICAgICAgICAgICAgICAgICAgICAgIChzZXRxIGVnbG90LS1kaWFnbm9zdGljcyBkaWFn cykpKSkpCiAgICAgICAoY2wtbG9vcAotICAgICAgIHdpdGggcGF0aCA9IChleHBhbmQtZmlsZS1u YW1lIChlZ2xvdC0tdXJpLXRvLXBhdGggdXJpKSkKICAgICAgICBmb3IgZGlhZy1zcGVjIGFjcm9z cyBkaWFnbm9zdGljcwogICAgICAgIGNvbGxlY3QgKGVnbG90LS1kYmluZCAoKERpYWdub3N0aWMp IGNvZGUgcmFuZ2UgbWVzc2FnZSBzZXZlcml0eSBzb3VyY2UpIGRpYWctc3BlYwogICAgICAgICAg ICAgICAgICAoc2V0cSBtZXNzYWdlIChtZXNzIHNvdXJjZSBjb2RlIG1lc3NhZ2UpKQ== --0000000000001ae39105ef1c3293--