diff options
author | Stefan Kangas <stefan@marxist.se> | 2020-11-19 22:10:20 +0100 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2020-11-20 20:55:09 +0100 |
commit | a79365acaff843a144eacc620bfe6992051f84d4 (patch) | |
tree | 90e56d7f7467e341229750db8e99203a7c9a73c9 /lisp/emacs-lisp/comp.el | |
parent | cf436db285bd27dae35fecfa9038c9ce48953853 (diff) | |
download | emacs-a79365acaff843a144eacc620bfe6992051f84d4.tar.gz emacs-a79365acaff843a144eacc620bfe6992051f84d4.tar.bz2 emacs-a79365acaff843a144eacc620bfe6992051f84d4.zip |
compile-async: Don't error out on deferred compilation after load
* lisp/emacs-lisp/comp.el (native-compile-async): Update
comp-files-queue when deferred compilation is requested. (Bug#44676)
Diffstat (limited to 'lisp/emacs-lisp/comp.el')
-rw-r--r-- | lisp/emacs-lisp/comp.el | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 633ededebe4..095bd63a10f 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -3511,14 +3511,12 @@ LOAD can be nil t or 'late." (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 deferred + ;; compilation, 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 |