fix(cli): void-variable comp-native-version-dir

There weren't enough checks that we were truly in a native-comp build of
Emacs. Not the most elegant solution, but the CLI rewrite handles this
far better so it'll do for now.

Fix #5131
This commit is contained in:
Henrik Lissner 2021-10-05 01:58:41 +02:00
parent 62c25afd0f
commit 5678a837dd

View file

@ -224,6 +224,8 @@ list remains lean."
(defun doom--write-missing-eln-errors () (defun doom--write-missing-eln-errors ()
"Write .error files for any expected .eln files that are missing." "Write .error files for any expected .eln files that are missing."
(when (and (require 'comp nil t)
(ignore-errors (native-comp-available-p)))
(cl-loop for file in doom--eln-output-expected (cl-loop for file in doom--eln-output-expected
for eln-name = (doom--eln-file-name file) for eln-name = (doom--eln-file-name file)
for eln-file = (doom--eln-output-file eln-name) for eln-file = (doom--eln-output-file eln-name)
@ -233,11 +235,12 @@ list remains lean."
do (make-directory (file-name-directory error-file) 'parents) do (make-directory (file-name-directory error-file) 'parents)
(write-region "" nil error-file) (write-region "" nil error-file)
(doom-log "Wrote %s" error-file)) (doom-log "Wrote %s" error-file))
(setq doom--eln-output-expected nil)) (setq doom--eln-output-expected nil)))
(defun doom--compile-site-packages () (defun doom--compile-site-packages ()
"Queue async compilation for all non-doom Elisp files." "Queue async compilation for all non-doom Elisp files."
(when (featurep 'comp) (when (and (featurep 'comp)
(ignore-errors (native-comp-available-p)))
(cl-loop with paths = (cl-loop for path in load-path (cl-loop with paths = (cl-loop for path in load-path
unless (string-prefix-p doom-local-dir path) unless (string-prefix-p doom-local-dir path)
collect path) collect path)