From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#58224: 29.0.50; "make bootstrap" spuriously warns: "comp.el newer than byte-compiled file" Date: Sat, 1 Oct 2022 21:15:46 +0000 Message-ID: References: <83fsg7bnt0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27744"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, Eli Zaretskii , 58224@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 01 23:16:13 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 1oejqG-000766-SF for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 01 Oct 2022 23:16:12 +0200 Original-Received: from localhost ([::1]:38574 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oejqF-00035E-8Q for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 01 Oct 2022 17:16:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oejq6-00034r-Mw for bug-gnu-emacs@gnu.org; Sat, 01 Oct 2022 17:16:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46693) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oejq6-0003HP-8v for bug-gnu-emacs@gnu.org; Sat, 01 Oct 2022 17:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oejq5-0002US-Ph for bug-gnu-emacs@gnu.org; Sat, 01 Oct 2022 17:16:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Oct 2022 21:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58224 X-GNU-PR-Package: emacs Original-Received: via spool by 58224-submit@debbugs.gnu.org id=B58224.16646589589562 (code B ref 58224); Sat, 01 Oct 2022 21:16:01 +0000 Original-Received: (at 58224) by debbugs.gnu.org; 1 Oct 2022 21:15:58 +0000 Original-Received: from localhost ([127.0.0.1]:45771 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oejq2-0002U9-9W for submit@debbugs.gnu.org; Sat, 01 Oct 2022 17:15:58 -0400 Original-Received: from mx3.muc.de ([193.149.48.5]:31741) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oejpz-0002Tu-Vz for 58224@debbugs.gnu.org; Sat, 01 Oct 2022 17:15:56 -0400 Original-Received: (qmail 21618 invoked by uid 3782); 1 Oct 2022 23:15:48 +0200 Original-Received: from acm.muc.de (p4fe1535c.dip0.t-ipconnect.de [79.225.83.92]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 01 Oct 2022 23:15:47 +0200 Original-Received: (qmail 4855 invoked by uid 1000); 1 Oct 2022 21:15:46 -0000 Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de 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:244166 Archived-At: Hello again, Stefan. I've hacked a quick fix together. The idea is to give the variable force-load-messages an extra possibility, 'never. This suppresses the messages we want to suppress. No guarantees, but the patch is below, if you want to try it out. On Sat, Oct 01, 2022 at 18:11:38 +0000, Alan Mackenzie wrote: > Hello, Stefan. > On Sat, Oct 01, 2022 at 18:10:19 +0200, Stefan Kangas wrote: > > Eli Zaretskii writes: > > > (This has nothing to do with what Lars did, it's due to changes by > > > Alan to speedup the first stage of the bootstrap.) > > Oh, right. I forgot about that. > > I'm copying in Alan, in case he has any comments. > Well, my thoughts back when implementing that speedup were that the > speedup was more important than a few irritating messages. I suppose > that's becomng less true as the long delays from the past fade from > memory. > The particular message about " newer than byte-compile file; using > older file" is hard-coded into Fload in src/lread.c. It was considered > important enough to supersede the flag variable force-load-messages. It > also supersedes the parameter NOMESSAGE to Fload. > I don't know why this message is considered so important. Maybe we > might reconsider its importance. But there are already two flag > variables meant to control messages from Fload, so adding a third > special one probably wouldn't be a good idea. > This doesn't seem like an easy issue to resolve without nasty special > case code. Either that, or we reconsider the mechanism of making the > ..elc files older to trigger make's recompiling of the .el files to .eln. > Maybe there's a better way of doing that. diff --git a/lisp/Makefile.in b/lisp/Makefile.in index bcf4a3146d..8065487f59 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -70,7 +70,8 @@ BYTE_COMPILE_FLAGS = --eval "(setq load-prefer-newer t byte-compile-warnings 'all)" \ $(BYTE_COMPILE_EXTRA_FLAGS) # ... but we must prefer .elc files for those in the early bootstrap. -compile-first: BYTE_COMPILE_FLAGS = $(BYTE_COMPILE_EXTRA_FLAGS) +compile-first: BYTE_COMPILE_FLAGS = \ + --eval "(setq force-load-messages 'never)" $(BYTE_COMPILE_EXTRA_FLAGS) # Files to compile before others during a bootstrap. This is done to # speed up the bootstrap process. They're ordered by size, so we use diff --git a/src/lread.c b/src/lread.c index 51cbf811ba..1ae0f9c0cc 100644 --- a/src/lread.c +++ b/src/lread.c @@ -1451,7 +1451,9 @@ Return t if the file exists and loads successfully. */) newer = 1; /* If we won't print another message, mention this anyway. */ - if (!NILP (nomessage) && !force_load_messages) + if (!NILP (nomessage) && + (NILP (Vforce_load_messages) + || !EQ (Vforce_load_messages, Qnever))) { Lisp_Object msg_file; msg_file = Fsubstring (found, make_fixnum (0), make_fixnum (-1)); @@ -1476,7 +1478,9 @@ Return t if the file exists and loads successfully. */) } val = call4 (Vload_source_file_function, found, hist_file_name, NILP (noerror) ? Qnil : Qt, - (NILP (nomessage) || force_load_messages) ? Qnil : Qt); + (NILP (nomessage) || + (!NILP (Vforce_load_messages) && !EQ (Vforce_load_messages, Qnever))) + ? Qnil : Qt); return unbind_to (count, val); } } @@ -1529,7 +1533,8 @@ Return t if the file exists and loads successfully. */) if (! NILP (Vpurify_flag)) Vpreloaded_file_list = Fcons (Fpurecopy (file), Vpreloaded_file_list); - if (NILP (nomessage) || force_load_messages) + if (NILP (nomessage) + || (!NILP (Vforce_load_messages) && !EQ (Vforce_load_messages, Qnever))) { if (is_module) message_with_string ("Loading %s (module)...", file, 1); @@ -1602,7 +1607,9 @@ Return t if the file exists and loads successfully. */) saved_strings[i].size = 0; } - if (!noninteractive && (NILP (nomessage) || force_load_messages)) + if (!noninteractive && (NILP (nomessage) + || (!NILP (Vforce_load_messages) + && !EQ (Vforce_load_messages, Qnever)))) { if (is_module) message_with_string ("Loading %s (module)...done", file, 1); @@ -5601,10 +5608,13 @@ incompatible byte codes can make Emacs crash when it tries to execute them. */); load_dangerous_libraries = 0; - DEFVAR_BOOL ("force-load-messages", force_load_messages, - doc: /* Non-nil means force printing messages when loading Lisp files. + DEFVAR_LISP ("force-load-messages", Vforce_load_messages, + doc: /* t means force printing messages when loading Lisp files. +`never' means suppress all messages when loading Lisp files. nil means just print +certain "important" messages. + This overrides the value of the NOMESSAGE argument to `load'. */); - force_load_messages = 0; + Vforce_load_messages = Qnil; DEFVAR_LISP ("bytecomp-version-regexp", Vbytecomp_version_regexp, doc: /* Regular expression matching safe to load compiled Lisp files. @@ -5685,6 +5695,8 @@ that are loaded before your customizations are read! */); DEFSYM (Qdir_ok, "dir-ok"); DEFSYM (Qdo_after_load_evaluation, "do-after-load-evaluation"); + DEFSYM (Qnever, "never"); + staticpro (&read_objects_map); read_objects_map = Qnil; staticpro (&read_objects_completed); -- Alan Mackenzie (Nuremberg, Germany).