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#50244: 28.0.50; Support project-wide diagnostics reports in flymake.el Date: Sat, 11 Sep 2021 02:08:42 +0100 Message-ID: <87y283536t.fsf@gmail.com> References: <87bl5hm5qj.fsf@gmail.com> 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="18456"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Dmitry Gutov To: 50244@debbugs.gnu.org, p.stephani2@gmail.com, theo@thornhill.no Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 11 03:09:15 2021 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 1mOrW7-0004i3-Iz for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 11 Sep 2021 03:09:15 +0200 Original-Received: from localhost ([::1]:42332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mOrW4-0004tW-V9 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 10 Sep 2021 21:09:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53050) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mOrVu-0004t7-Az for bug-gnu-emacs@gnu.org; Fri, 10 Sep 2021 21:09:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56024) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mOrVu-0003j0-2Y for bug-gnu-emacs@gnu.org; Fri, 10 Sep 2021 21:09:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mOrVt-0006A8-Mr for bug-gnu-emacs@gnu.org; Fri, 10 Sep 2021 21:09:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87bl5hm5qj.fsf@gmail.com> 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: Sat, 11 Sep 2021 01:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50244 X-GNU-PR-Package: emacs Original-Received: via spool by 50244-submit@debbugs.gnu.org id=B50244.163132253323671 (code B ref 50244); Sat, 11 Sep 2021 01:09:01 +0000 Original-Received: (at 50244) by debbugs.gnu.org; 11 Sep 2021 01:08:53 +0000 Original-Received: from localhost ([127.0.0.1]:39337 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOrVk-00069j-Mp for submit@debbugs.gnu.org; Fri, 10 Sep 2021 21:08:52 -0400 Original-Received: from mail-wm1-f43.google.com ([209.85.128.43]:46825) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOrVi-00069T-SN for 50244@debbugs.gnu.org; Fri, 10 Sep 2021 21:08:51 -0400 Original-Received: by mail-wm1-f43.google.com with SMTP id m25-20020a7bcb99000000b002e751bcb5dbso2491484wmi.5 for <50244@debbugs.gnu.org>; Fri, 10 Sep 2021 18:08:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Necd2Hbt8bV74WxBzQIeBKbgrImsycerXT4zgcXsC7k=; b=izOW+09BJmbEHvsXZ0Gj0WWvgwoNF6feDiDyxSZ7+aVmEFtvFfkkl1e9Rp+EDd/KaU vLYIdnI5E0SExOjXB48ES4Ek9k1U1MQwKIYS1B0ls8qKogWBttSMCNFcjE/Go2UPQmp2 kBJI4DQWLS1IGlvZW3h1UUzQhmt1bnGin+S/H2kSmKwVuhIqPOZ6eA6bMr/aqopJgxzI XFxNE9b3iKVqj8k2DX5BmT6NDWczzjb/YL9cFGIhO/ZFMZOJljhIY/zvLidT0gPgMmU1 EO5OsTdRa/6J5hWtCqZo9OAop0PVxsbV6Hv3Pu9zziGlXGTxO/WblGDcVsg3ASRjFYOW NH4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Necd2Hbt8bV74WxBzQIeBKbgrImsycerXT4zgcXsC7k=; b=lvWcBtIWCKp8SxGh8njVyOinoCSnFTUBJfQu/AE5WGKNkwaQy2UCwF1C9ktl+f2+4u 4pVwv3qXYW0v7TRAhKeGKTncvgcYrt6f8uuoT0aDux0wy55I6bVwFbPkKnHc5qHyg7XH szRA56BqkTcSY6riXTlxtN+4GvExZp74/XnAPOWfmXkm6yO98MQPh02wtkj7CvawmvAQ NzuaKvSGRvfb/kuNDoXZcIETfQn4OBv+rpyymHAoUvGzgJpEo2HSbQSwwRIh5P5MIc6H nMaoMb4ln55FMT4W1P+FVcFv3adAMGzEjuPLVAU7M+RXKi7hhdVpSerYR2B2EP3afsMe 8r7A== X-Gm-Message-State: AOAM532i9ScD/P7U81H/MWTErCGXs9QFVs7Yz/WvGZM761bp7vNDnosO Vj2i4ck8+em4BMM4f/QyO8w= X-Google-Smtp-Source: ABdhPJzE3lxaB6Br/2BPuvebrxO6o85K6je/bhD9EQ2bblrqHhRSu509Pyl2qGMmmr0tDUIiQpRrUQ== X-Received: by 2002:a05:600c:2101:: with SMTP id u1mr408272wml.45.1631322525021; Fri, 10 Sep 2021 18:08:45 -0700 (PDT) Original-Received: from nadja (a94-133-14-55.cpe.netcabo.pt. [94.133.14.55]) by smtp.gmail.com with ESMTPSA id n4sm204681wra.37.2021.09.10.18.08.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Sep 2021 18:08:44 -0700 (PDT) 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" Xref: news.gmane.io gmane.emacs.bugs:214041 Archived-At: > The idea is simply to not discard what I called "piggy-backed" or > "sideband" information about diagnostics in other places, which will > frequently originate from the aforementioned per-buffer requests. Hi, I've been working on this quite intensively and am finally approaching sometehing stable. You may check my ongoing work in the branch scratch/bug-50244. As expected, I abandoned/reformulated much of my original design ideas many times as I faced new edge cases. It was quite challenging to support the main new command, M-x flymake-show-project-diagnostics, when e.g. .c files referencing problems in .h files are killed and vice-versa in various orders. If you're interested in understanding how it works, the main entry point are the additions to the existing documentation, the manual that lives in flymake.texi and the docstrings. As is explained in the manual, there are two types of Flymake diagnostics: (1) the usual diagnostics for the current buffer, and (2) so-called non-domestic diagnostics, which might be "foreign" diagnostics or "list-only" diagnostics. The difference is explained in the new manual section "Foreign and list-only diagnostics". How does this matter in practice? - For the examples of .c/.h files (and the flymake-cc backend, which I also updated), "foreign diagnostics" are used. - For LSP, likely "list-only diagnostics" should be used. So basically Eglot will soon learn to tell Flymake about the "list-only diagnostics" that it receives from some LSP servers. Once that is done, M-x flymake-show-project-diagnostics should ideally do most things that Theodor wants. Even though the protocol is already designed, flymake.el is still missing the implementation of "list-only diagnostics". It should, in principle, be much simpler than the "foreign diagnostics", which as I hinted above are much harder to keep up to date. I hope you can have a look, Thank you, Jo=C3=A3o