From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#44746: 28.0.50; [feature/native-comp] Noisy "*Warnings*" buffer shown on start Date: Thu, 25 Feb 2021 22:58:54 +0000 Message-ID: References: Reply-To: Andrea Corallo 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="31702"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: stefan@marxist.se To: 44746@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 26 00:00:23 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 1lFPcN-0008AU-8o for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 Feb 2021 00:00:23 +0100 Original-Received: from localhost ([::1]:54468 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lFPcL-0005V0-UO for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Feb 2021 18:00:21 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lFPc4-0005SK-Kl for bug-gnu-emacs@gnu.org; Thu, 25 Feb 2021 18:00:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56370) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lFPc2-0005RK-NU for bug-gnu-emacs@gnu.org; Thu, 25 Feb 2021 18:00:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lFPc2-0003Eo-MT for bug-gnu-emacs@gnu.org; Thu, 25 Feb 2021 18:00:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Feb 2021 23:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44746 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" X-Debbugs-Original-Cc: 44746@debbugs.gnu.org, Stefan Kangas Original-Received: via spool by 44746-submit@debbugs.gnu.org id=B44746.161429394112309 (code B ref 44746); Thu, 25 Feb 2021 23:00:02 +0000 Original-Received: (at 44746) by debbugs.gnu.org; 25 Feb 2021 22:59:01 +0000 Original-Received: from localhost ([127.0.0.1]:39677 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lFPb3-0003CP-0t for submit@debbugs.gnu.org; Thu, 25 Feb 2021 17:59:01 -0500 Original-Received: from mx.sdf.org ([205.166.94.24]:61622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lFPay-0003CE-VU for 44746@debbugs.gnu.org; Thu, 25 Feb 2021 17:59:00 -0500 Original-Received: from mab (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 11PMwsox006202 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Thu, 25 Feb 2021 22:58:55 GMT In-Reply-To: (Andrea Corallo via's message of "Fri, 20 Nov 2020 08:31:18 +0000") 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:200822 Archived-At: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > Stefan Kangas writes: > >> Every time I start Emacs after recompilation or clearing cache, I see a >> "*Warnings*" buffer popup in a new window, filled with a large amount of >> warnings like these: >> >> Warning (comp): debian-ispell.el:229:17: Warning: assignment to free >> variable Disable showing Disable logging >> Warning (comp): debian-ispell.el:228:28: Warning: reference to free >> variable =E2=80=98really-hunspell=E2=80=99 Disable showing Disable loggi= ng >> Warning (comp): debian-ispell.el:386:16: Warning: reference to free >> variable Disable showing Disable logging >> Warning (comp): debian-ispell.el:392:16: Warning: reference to free >> variable Disable showing Disable logging >> Warning (comp): debian-ispell.el:393:16: Warning: reference to free >> variable Disable showing Disable logging >> Warning (comp): debian-ispell.el:403:24: Warning: assignment to free >> variable Disable showing Disable logging >> Warning (comp): debian-ispell.el:403:20: Warning: reference to free >> variable Disable showing Disable logging >> [...] >> Warning (comp): init-general.el:44:7: Warning: assignment to free >> variable Disable showing Disable logging >> Warning (comp): init-general.el:45:7: Warning: assignment to free >> variable Disable showing Disable logging >> Warning (comp): init-general.el:47:7: Warning: assignment to free >> variable =E2=80=98Man-width=E2=80=99 Disable showing Disable logging >> [...] >> >> (The file init-general.el is required from my init file.) >> >> To reproduce this, I would assume it is sufficient to either run Debian, >> where the debian-ispell.el file is part of the site-files, or having an >> init file requiring a file with, for example, the line: >> >> (setq display-time-24hr-format t) ; my line 47 above >> >> >> I'm not exactly sure what the best course of action is here. But >> wouldn't it be better to not show this at all to users, unless they >> explicitly ask for it? As it stands, it is a bit too noisy and >> in-your-face, I think. >> >> (I also don't understand why the byte-compiler does not complain about >> these variables.) > > The byte compiler does not complain because when it compiles these > definitions happen to be present in the compilation environment (read > the file defining these variables was by chance already loaded). Each > file should be consistent and compilable regardless the load history of > the Emacs used to compile (read specify the correct requires). > > Given async compilation start from a fresh Emacs it's more sensitive > into spotting these errors or warnings. > > Reporting these messages to the user as warnings was the result of > #44168. Before #44168 these messages where only reported into the > *Async-native-compile-log*. > > This was requested by a number of people because more than one package > missed requiring the feature containing some macro definition. This > indeed resulted in miscompilations with the diagnostic message being > "hidden" in *Async-native-compile-log*. > > Compilation units should *not* rely on the compiler environment for > their definitions. > > So yeah these are real warnings or errors and package developers need to > get them somehow. They could manifest also on non nativecomp builds if > the compilation order or something else chance. So this is not only a > nice clean-up but also a real fix IMO. > > I'm not sure what's the best action we can take to reduce the verbosity > but keep developers informed at the same time. > > Andrea To complete this answer, ATM is possible to gate all warnings reported by async native compilations leveraging the `comp-async-report-warnings-errors' customize. Is this sufficient to close this bug or do we like to discuss this default? My opinion (got it from the discussion on emacs-devel) is that at least for now would be good to keep `comp-async-report-warnings-errors' to t for the reason I've explained in the mail I'm quoting. Perhaps we could think about revisiting this default but probably in the future. Thanks Andrea