]> git.eshelyaron.com Git - emacs.git/commitdiff
* Fix native-compile-async for bug#40602.
authorAndrea Corallo <akrl@sdf.org>
Mon, 13 Apr 2020 19:39:15 +0000 (20:39 +0100)
committerAndrea Corallo <akrl@sdf.org>
Mon, 13 Apr 2020 19:44:09 +0000 (20:44 +0100)
* lisp/emacs-lisp/comp.el (native-compile-async): Relax coherency condition.

lisp/emacs-lisp/comp.el

index 9dc775bb6ac659a7bd5f80ae7b794b052dcd2102..a4764f91c3ad6e0f4ad649eb5c8e31096e826386 100644 (file)
@@ -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)