summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/comp.el
diff options
context:
space:
mode:
authorAndrea Corallo <akrl@sdf.org>2020-04-13 20:39:15 +0100
committerAndrea Corallo <akrl@sdf.org>2020-04-13 20:44:09 +0100
commit9f42f35418c568ae22eca65ecec773ff40f2fc0e (patch)
treead96fb98a3001a1e2066aedd9575c693fbf945f1 /lisp/emacs-lisp/comp.el
parent517c123fd4b250b570ce6f47ead4c14eac41ab8c (diff)
downloademacs-9f42f35418c568ae22eca65ecec773ff40f2fc0e.tar.gz
emacs-9f42f35418c568ae22eca65ecec773ff40f2fc0e.tar.bz2
emacs-9f42f35418c568ae22eca65ecec773ff40f2fc0e.zip
* Fix native-compile-async for bug#40602.
* lisp/emacs-lisp/comp.el (native-compile-async): Relax coherency condition.
Diffstat (limited to 'lisp/emacs-lisp/comp.el')
-rw-r--r--lisp/emacs-lisp/comp.el10
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 9dc775bb6ac..a4764f91c3a 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -2311,9 +2311,13 @@ 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=)))
- (cl-assert (eq load (cdr entry))
- nil "Incoherent load kind in compilation queue for %s"
- file)
+ (when load
+ ;; When no load is specified (plain async compilation) we
+ ;; consider valid the one previously queued, otherwise we
+ ;; check for coherence (bug#40602).
+ (cl-assert (eq load (cdr entry))
+ nil "Incoherent load kind in compilation queue for %s"
+ file))
(setf comp-files-queue (append comp-files-queue `((,file . ,load))))))
(when (zerop (comp-async-runnings))
(comp-run-async-workers)