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#55811: 29.0.50; No flymake diagnostics for no-byte-compile files Date: Tue, 07 Jun 2022 13:02:41 +0100 Message-ID: <87bkv465r2.fsf@gmail.com> References: <87k09u26ls.fsf@gnus.org> <87k09t561m.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2325"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Lars Ingebrigtsen , 55811@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 07 14:37:36 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 1nyYSm-0000Nl-Iw for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Jun 2022 14:37:36 +0200 Original-Received: from localhost ([::1]:34796 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nyYSl-0004lt-Ig for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Jun 2022 08:37:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyXuM-0005S3-S8 for bug-gnu-emacs@gnu.org; Tue, 07 Jun 2022 08:02:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44969) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nyXuM-0002wq-E2 for bug-gnu-emacs@gnu.org; Tue, 07 Jun 2022 08:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nyXuM-0004p0-AP for bug-gnu-emacs@gnu.org; Tue, 07 Jun 2022 08:02:02 -0400 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: Tue, 07 Jun 2022 12:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55811 X-GNU-PR-Package: emacs Original-Received: via spool by 55811-submit@debbugs.gnu.org id=B55811.165460329617362 (code B ref 55811); Tue, 07 Jun 2022 12:02:02 +0000 Original-Received: (at 55811) by debbugs.gnu.org; 7 Jun 2022 12:01:36 +0000 Original-Received: from localhost ([127.0.0.1]:38866 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyXtu-0004UL-SE for submit@debbugs.gnu.org; Tue, 07 Jun 2022 08:01:36 -0400 Original-Received: from mail-wr1-f52.google.com ([209.85.221.52]:40828) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nyXtp-0004KB-5T for 55811@debbugs.gnu.org; Tue, 07 Jun 2022 08:01:33 -0400 Original-Received: by mail-wr1-f52.google.com with SMTP id k16so23855939wrg.7 for <55811@debbugs.gnu.org>; Tue, 07 Jun 2022 05:01:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=GQxkozSOvG/GIUT0PcwHOQ4GBUbzj5Im8D2iaeCHQC8=; b=YzTD756pHfzhUfBQX3vsQRv2tUWybYT1E+tvEGWq+IvbJMh26VAW+JgEWzNAFm+xVN dkGcBX4GtrASO0hnUIDlwhdyfXoXT/s+9U0HwiM6xPeZW6tiXOpQd4eV9GbNUiO8tYUz AyoErp8i6WGGU6yI/Pm1hKxACsbPEduJRW/XoLED9GXxjJM8Y//njRICPTU9hjLVo4Wp qPDmMfnraCt0t+7v3LwkIBCeO7ywP3Ps7mExfvsNOD/9WWjUBp/PduD9660Jq6y3sr85 phAaQEwovrQXBqbacmzyHjfxQeBOD9w54VUW8c3Q0vs2Woteb+ZNlPWEo1L2RVxP8ct0 WOLg== 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:references:date:in-reply-to :message-id:user-agent:mime-version; bh=GQxkozSOvG/GIUT0PcwHOQ4GBUbzj5Im8D2iaeCHQC8=; b=x+UOsLI/1jJDkVthC6OOJmB63F3aAG1vOG6AZhRsQvl0OUs4aYip9msKu1EPwzzeq8 sixkPBrPwG+UiRTisXNDaQfJp21oAHH6s6V12jjrTfNuaxoJJMUOT/SttjG53+LVjIaQ AUthFmLLGbu8dzeRSvPDJ0bG+CIkM9CFfFTq1BGd0oy9DeBFmRln8SYqx+MXLXhegILq AM2giB6Iy5h5UCJg/AaPkVL2F11sGU899TB4roR4bL1KjUG4tdHfTCaaWr+R95BHHXaU 1fqLc0XBZsbYUw0Dj4FWIHxt/KDhbqPQH6ehUqtrs0nBMavYzkdFbTG0cDSy4KKRrg/n TASQ== X-Gm-Message-State: AOAM533bBU/vO6UsqLh+DdsInrP/3xzMw6j9K+sD/mIASSC85sdln+3q k9lM1SGnT33ktctuOZK8h8P4iRvUmCEekw== X-Google-Smtp-Source: ABdhPJx9Jy7c0PI8BrkECLNODG2P4ENU9PvsyPgRshH9GD0fFT9K5B8K4kQH6u8l95fN25MPyWjNAw== X-Received: by 2002:adf:f68f:0:b0:216:10c6:b389 with SMTP id v15-20020adff68f000000b0021610c6b389mr17930465wrp.251.1654603282685; Tue, 07 Jun 2022 05:01:22 -0700 (PDT) Original-Received: from krug ([87.196.73.138]) by smtp.gmail.com with ESMTPSA id s1-20020adfea81000000b00210320d9fbfsm21561955wrm.18.2022.06.07.05.01.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 05:01:22 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Tue, 07 Jun 2022 07:47:24 -0400") 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:233873 Archived-At: Stefan Monnier writes: >> Of course you know this -- but just to clarify -- the byte-compilation >> backend works by launching a Emacs -Q which is asked to byte-compile >> only a file containing the current buffer's contents. During that >> byte-compilation nothing more is loaded apart from what is preloaded or >> explicitly loaded by the file at compile-time (via require or >> eval-when/and-compile stuff). > > This bug-report is about the fact that there is no benefit to > obeying `no-byte-compile` in flymake. Not about improving the way the > sub-process reproduces a "good" initial state to compile the file > (e.g. set up of `load-path` and whatnot). Sure, I understood. I was just commenting on the fact that the quality of Flymake diagnostics might not be so good/helpful since those diagnostics are likely affected by the same root causes that prevent normal byte compilation anyway. ( Also, on the tangent note about load-path and Flymake, I completely forgot that I added elisp-flymake-byte-compile-load-path some 4 years ago.) >> Anyway, maybe you could give small example of such a file containing >> such a cookie where you think Flymake's "I refuse to lint this" behavior >> could be improved. > > A good example are all the files in the > [EEV](http://elpa.gnu.org/packages/eev.html) package. OK. Try this "100% untested patch" (TM) then: diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 70826b4c3a..b99007c938 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -2152,7 +2152,9 @@ elisp-flymake--batch-compile-for-flymake collected) t))) (unwind-protect - (byte-compile-file file) + (progn + (setq-local no-byte-compile nil) + (byte-compile-file file)) (ignore-errors (kill-buffer byte-compile-log-buffer))) (prin1 :elisp-flymake-output-start)