From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Newsgroups: gmane.emacs.bugs Subject: bug#59824: flymake-show-project-diagnotics not updating (eglot for Java with jdtls) Date: Mon, 5 Dec 2022 11:30:54 +0000 Message-ID: References: <87v8mqq3u7.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000e068b905ef130553" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25057"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59824@debbugs.gnu.org To: David Ventimiglia Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 05 12:32:17 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 1p29hp-0006Ie-7E for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Dec 2022 12:32:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p29hj-0003it-Mg; Mon, 05 Dec 2022 06:32:11 -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 1p29ha-0003an-Pu for bug-gnu-emacs@gnu.org; Mon, 05 Dec 2022 06:32:06 -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 1p29ha-0005qU-BS for bug-gnu-emacs@gnu.org; Mon, 05 Dec 2022 06:32:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p29hZ-0003dB-Sc for bug-gnu-emacs@gnu.org; Mon, 05 Dec 2022 06:32:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Dec 2022 11:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59824 X-GNU-PR-Package: emacs Original-Received: via spool by 59824-submit@debbugs.gnu.org id=B59824.167023987613950 (code B ref 59824); Mon, 05 Dec 2022 11:32:01 +0000 Original-Received: (at 59824) by debbugs.gnu.org; 5 Dec 2022 11:31:16 +0000 Original-Received: from localhost ([127.0.0.1]:35463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p29gq-0003cw-DM for submit@debbugs.gnu.org; Mon, 05 Dec 2022 06:31:16 -0500 Original-Received: from mail-oa1-f48.google.com ([209.85.160.48]:38617) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p29gl-0003cp-8b for 59824@debbugs.gnu.org; Mon, 05 Dec 2022 06:31:15 -0500 Original-Received: by mail-oa1-f48.google.com with SMTP id 586e51a60fabf-1322d768ba7so13073875fac.5 for <59824@debbugs.gnu.org>; Mon, 05 Dec 2022 03:31:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=genFDQpEdiFOMiyN03JCm+7jqjCnURLOR8M3CKghlak=; b=qr/202dywXtACMib3mU/gSuZTV5BXhqeRPSs05WQ8Xozv7NnddzmaqozhR9lIQIngR 9RfhrRB/sTji+e6FKMYwq14F8C+gJcDoY1A1jnZ0w8rAe+ILYfXBcHW87IAoW2EXV6gq V2C469X+OcN/V1dNgECCHLLJ8KoUi500Rr1Qg0L7wDd7SS4fV4TEknW8v0dgL5RglpIM Kc6pWg/eey+QO+r+TF9UJmTxCvxFLuMgkxeXcyMvS4Q2EjCty0HtJZOJn2/dsvhu5s7k 8FP4mkR/Zpv6bvvPGki7q8esf6Uc1U9UKgL4nstjNcQ0d9R3Yul7nmk7K+/vXuNBaMlO 9FvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=genFDQpEdiFOMiyN03JCm+7jqjCnURLOR8M3CKghlak=; b=b9bUNn+i48YGrh1dz2yM3f+ZHdcwFJKrU0/bVz046Q5ujMhttYSxQLHOEBBTTrk9XK SnvDHaXktjam2giU+1fMYtTkgB594RMSuKdC86XLxZp4j69TnM5uLLgOfZQ4hgzWDT4Y +SDHqK3sSJjHEz6yUaU8nNMWX0XYtI2QCEEtk06PsxMrpeQGalVy76oHi+DmTI4Y1FLT TYKPp19rPa9OBRsfxI8Uz0/lp/Yjj+pnqDBXPGOm+ML8B+IWh15jEMI/3USFf50ZXmPc ujyLTD5sI82gjOuNXfDd4+rU2L9ILrqmPDSmDPP+RrprFgS3uTGL6TCb2DBdwpM5jPVb FcJw== X-Gm-Message-State: ANoB5plWxVB6l6dvI45EC0wfHpAv6/2IAG2LfA+8dlLUnIQdfyTVl1KP XiuXzzfkjKLunV9f15/bvH9x5obV1hHGTAQwdYE= X-Google-Smtp-Source: AA0mqf5Fq4jtBxSuynbG1aPaZwvKXSd6doZhal+aeXpRw9QdO+qUeVpDAKg7ov95bdcS91196Amqs5Qb4joJWjWRuV8= X-Received: by 2002:a05:6870:aa0e:b0:144:9e0c:d475 with SMTP id gv14-20020a056870aa0e00b001449e0cd475mr2138200oab.215.1670239865561; Mon, 05 Dec 2022 03:31:05 -0800 (PST) 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:250006 Archived-At: --000000000000e068b905ef130553 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Dec 4, 2022 at 11:23 PM David Ventimiglia < davidaventimiglia@neptunestation.com> wrote: > > That seems to have fixed it. Can you explain what's going on here? What's going on is "a lot" or "not much" depending on the level of detail you're after. There are two main types of project-wide diagnostic, as described in the manual, depending on whether the file that the diagnostic refers to is or isn't visited by emacs with Flymake enabled. As [1] explains, the unvisited type can be handled by "foreign" or "list-only" diagnostics. Eglot uses the latter. When Eglot is activated in a buffer visiting one of the files that were in 'flymake-list-only-diagnostics' it needs to remember to remove that file from that list, as it is no longer needed there. This wasn't happening and my patch fixes it. The project listing is then refreshed automatically (at least it seems it is, according to your report). Hope this helps. > To my untutored eye, it looks we're doing the following. [...] Am I close? To be honest, I don't think so. At least I don't recognize in your description the design I put forth some time ago (and which I had since forgotten until this bug). Jo=C3=A3o [1]: https://www.gnu.org/software/emacs/manual/html_node/flymake/Foreign-and-lis= t_002donly-diagnostics.html --000000000000e068b905ef130553 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sun, Dec 4, 2022 at 11:23 PM David Ventimiglia <davidaventimiglia@neptu= nestation.com> wrote:
>
> That seems to have fixed it.= =C2=A0 Can you explain what's going on here?=C2=A0=C2=A0

<= /div>
What's going on is "a lot" or "not much" = depending on the level of detail you're after.

There are two main types of project-wide diagnostic, as described in the m= anual,
depending on whether the file that the diagnostic refers t= o is or isn't visited by emacs=C2=A0
with Flymake enabled.

As [1] explains, the unvisited type can be handled b= y "foreign" or "list-only" diagnostics.=C2=A0
Eglot uses the latter.=C2=A0 When Eglot is activated in a buffer visiting = one of the files that
were in 'flymake-list-only-diagnostics&= #39; it needs to remember to remove that file from=C2=A0
that lis= t, as it is no longer needed there.=C2=A0 This wasn't happening and my = patch fixes it.
The project listing is then refreshed automatical= ly (at least it seems it is, according to=C2=A0
your report).

Hope this helps.

> To= my untutored=C2=A0 eye, it looks we're doing the following. [...] Am I= close?

To be honest, I don't think so. At lea= st I don't recognize in your description the design
I put for= th some time ago (and which I had since forgotten until this bug).

Jo=C3=A3o


<= /div>
--000000000000e068b905ef130553--