GNU bug report logs -
#44676
[PATCH] Support native compilation of packages on install
Previous Next
Reported by: Stefan Kangas <stefan <at> marxist.se>
Date: Mon, 16 Nov 2020 02:39:01 UTC
Severity: wishlist
Tags: fixed, patch
Done: Stefan Kangas <stefan <at> marxist.se>
Bug is archived. No further changes may be made.
Full log
Message #23 received at 44676 <at> debbugs.gnu.org (full text, mbox):
Stefan Kangas <stefan <at> marxist.se> writes:
> From 5c7e414f99962a9e1481a1311fa967f3c7df4b69 Mon Sep 17 00:00:00 2001
> From: Stefan Kangas <stefan <at> marxist.se>
> Date: Thu, 19 Nov 2020 22:10:20 +0100
> Subject: [PATCH 1/4] compile-async: Don't error out if late loading after
> normal load
>
> * lisp/emacs-lisp/comp.el (native-compile-async): Update
> comp-files-queue when an explicit late load is specified. (Bug#44676)
> ---
> lisp/emacs-lisp/comp.el | 14 ++++++--------
> 1 file changed, 6 insertions(+), 8 deletions(-)
>
> diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
> index cc5922c61c..a9a07535a4 100644
> --- a/lisp/emacs-lisp/comp.el
> +++ b/lisp/emacs-lisp/comp.el
> @@ -3511,14 +3511,12 @@ native-compile-async
> (list "Path not a file nor directory" path)))))
> (dolist (file files)
> (if-let ((entry (cl-find file comp-files-queue :key #'car :test #'string=)))
> - ;; When no load is specified (plain async compilation) we
> - ;; consider valid the one previously queued, otherwise we
> - ;; check for coherence (bug#40602).
> - (cl-assert (or (null load)
> - (eq load (cdr entry)))
> - nil "Trying to queue %s with LOAD %s but this is already \
> -queued with LOAD %"
> - file load (cdr entry))
> + ;; Most likely the byte-compiler has requested a late load,
I'd mention "deferred compilation" in place of "byte-compiler" as I
believe is more accurate. This is the mechanism that triggers it and
also the customize that controls it.
> + ;; so update `comp-files-queue' to reflect that.
> + (unless (or (null load)
> + (eq load (cdr entry)))
> + (cl-substitute (cons file load) (car entry) comp-files-queue
> + :key #'car :test #'string=))
> ;; Make sure we are not already compiling `file' (bug#40838).
> (unless (or (gethash file comp-async-compilations)
> ;; Also exclude files from deferred compilation if
> --
> 2.29.2
LGTM, okay with that nit.
Thanks
Andrea
This bug report was last modified 4 years and 264 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.