GNU bug report logs - #57627
29.0.50; [native-compilation] cl-loaddefs.el recompiled on startup

Previous Next

Package: emacs;

Reported by: German Pacenza <germanp82 <at> hotmail.com>

Date: Tue, 6 Sep 2022 14:55:04 UTC

Severity: normal

Tags: moreinfo

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Andrea Corallo <acorallo <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: psainty <at> orcon.net.nz, 57627 <at> debbugs.gnu.org, larsi <at> gnus.org, arash <at> gnu.org, monnier <at> iro.umontreal.ca
Subject: bug#57627: 29.0.50; [native-compilation] cl-loaddefs.el recompiled on startup
Date: Sun, 13 Oct 2024 18:12:19 -0400
Andrea Corallo <acorallo <at> gnu.org> writes:

> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>> Ping!
>
> Here I'm.
>
> I tried again reproducing the bug but with no success, maybe it depends
> on the configuration?
>
> Anyway the following patch makes Phil test return (t t t t), essentially
> if "file" ends with ".el.gz" we just remove the final ".gz" and keep the
> previous logic.
>

[...]

Ops, better to save the match data to avoid side effects:

===================
modified   lisp/emacs-lisp/comp-run.el
@@ -143,20 +143,25 @@ native--compile-async-skip-p

 LOAD and SELECTOR work as described in `native--compile-async'."
   ;; Make sure we are not already compiling `file' (bug#40838).
-  (or (gethash file comp-async-compilations)
-      (gethash (file-name-with-extension file "elc") comp--no-native-compile)
-      (cond
-       ((null selector) nil)
-       ((functionp selector) (not (funcall selector file)))
-       ((stringp selector) (not (string-match-p selector file)))
-       (t (error "SELECTOR must be a function a regexp or nil")))
-      ;; Also exclude files from deferred compilation if
-      ;; any of the regexps in
-      ;; `native-comp-jit-compilation-deny-list' matches.
-      (and (eq load 'late)
-           (seq-some (lambda (re)
-                      (string-match-p re file))
-                    native-comp-jit-compilation-deny-list))))
+  (let ((file (save-match-data
+                (if (string-match (rx (group-n 1 (one-or-more nonl) ".el") ".gz" eol)
+                                  file)
+                    (match-string 1 file)
+                  file))))
+    (or (gethash file comp-async-compilations)
+        (gethash (file-name-with-extension file "elc") comp--no-native-compile)
+        (cond
+         ((null selector) nil)
+         ((functionp selector) (not (funcall selector file)))
+         ((stringp selector) (not (string-match-p selector file)))
+         (t (error "SELECTOR must be a function a regexp or nil")))
+        ;; Also exclude files from deferred compilation if
+        ;; any of the regexps in
+        ;; `native-comp-jit-compilation-deny-list' matches.
+        (and (eq load 'late)
+             (seq-some (lambda (re)
+                         (string-match-p re file))
+                       native-comp-jit-compilation-deny-list)))))

 (defvar comp-files-queue ()
   "List of Emacs Lisp files to be compiled.")

===========================

  Andrea




This bug report was last modified 222 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.