Merge pull request #4309 from flatwhatson/fix-native-comp
Update for the latest native-compile-async API
This commit is contained in:
commit
e4890f6ac9
3 changed files with 22 additions and 4 deletions
|
@ -225,9 +225,12 @@ list remains lean."
|
||||||
collect path)
|
collect path)
|
||||||
for file in (doom-files-in paths :match "\\.el\\(?:\\.gz\\)?$")
|
for file in (doom-files-in paths :match "\\.el\\(?:\\.gz\\)?$")
|
||||||
if (and (file-exists-p (byte-compile-dest-file file))
|
if (and (file-exists-p (byte-compile-dest-file file))
|
||||||
(not (doom--find-eln-file (doom--eln-file-name file)))) do
|
(not (doom--find-eln-file (doom--eln-file-name file)))
|
||||||
|
(not (cl-some (lambda (re)
|
||||||
|
(string-match-p re file))
|
||||||
|
comp-deferred-compilation-deny-list))) do
|
||||||
(doom-log "Compiling %s" file)
|
(doom-log "Compiling %s" file)
|
||||||
(native-compile-async file nil 'late))))
|
(native-compile-async file))))
|
||||||
|
|
||||||
(defun doom--bootstrap-trampolines ()
|
(defun doom--bootstrap-trampolines ()
|
||||||
"Build the trampolines we need to prevent hanging."
|
"Build the trampolines we need to prevent hanging."
|
||||||
|
|
17
core/core.el
17
core/core.el
|
@ -286,13 +286,28 @@ config.el instead."
|
||||||
(add-to-list 'comp-eln-load-path (concat doom-cache-dir "eln/")))
|
(add-to-list 'comp-eln-load-path (concat doom-cache-dir "eln/")))
|
||||||
|
|
||||||
(after! comp
|
(after! comp
|
||||||
|
;; Support the deprecated name for comp-deferred-compilation-deny-list
|
||||||
|
;; (changed in feature/native-comp@6104ab0f)
|
||||||
|
(unless (boundp 'comp-deferred-compilation-deny-list)
|
||||||
|
(defvaralias 'comp-deferred-compilation-deny-list
|
||||||
|
'comp-deferred-compilation-black-list))
|
||||||
|
|
||||||
|
;; Support native-compile-async lacking selector parameter
|
||||||
|
;; (added in feature/native-comp@7a8370ed)
|
||||||
|
(when (< (cdr (func-arity #'native-compile-async)) 4)
|
||||||
|
(defadvice! doom--native-compile-async-a (orig-fn paths &optional recursively load _selector)
|
||||||
|
:around #'native-compile-async
|
||||||
|
(if (fboundp 'native--compile-async)
|
||||||
|
(native--compile-async paths recursively load)
|
||||||
|
(funcall orig-fn paths recursively load))))
|
||||||
|
|
||||||
;; HACK Disable native-compilation for some troublesome packages
|
;; HACK Disable native-compilation for some troublesome packages
|
||||||
(dolist (entry (list (concat "\\`" (regexp-quote doom-local-dir) ".*/evil-collection-vterm\\.el\\'")
|
(dolist (entry (list (concat "\\`" (regexp-quote doom-local-dir) ".*/evil-collection-vterm\\.el\\'")
|
||||||
;; https://github.com/nnicandro/emacs-jupyter/issues/297
|
;; https://github.com/nnicandro/emacs-jupyter/issues/297
|
||||||
(concat "\\`" (regexp-quote doom-local-dir) ".*/jupyter-channel\\.el\\'")
|
(concat "\\`" (regexp-quote doom-local-dir) ".*/jupyter-channel\\.el\\'")
|
||||||
(concat "\\`" (regexp-quote doom-local-dir) ".*/with-editor\\.el\\'")
|
(concat "\\`" (regexp-quote doom-local-dir) ".*/with-editor\\.el\\'")
|
||||||
(concat "\\`" (regexp-quote doom-autoloads-file) "'")))
|
(concat "\\`" (regexp-quote doom-autoloads-file) "'")))
|
||||||
(add-to-list 'comp-deferred-compilation-black-list entry)))
|
(add-to-list 'comp-deferred-compilation-deny-list entry)))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
:branch ,straight-repository-branch
|
:branch ,straight-repository-branch
|
||||||
:local-repo "straight.el"
|
:local-repo "straight.el"
|
||||||
:files ("straight*.el"))
|
:files ("straight*.el"))
|
||||||
:pin "0f283e2f92c106d5bbb558862d433954fc8db179")
|
:pin "3277e1c9648b41dd5bfb239c067b8374ed2ec2bb")
|
||||||
|
|
||||||
;; core-modules.el
|
;; core-modules.el
|
||||||
(package! use-package
|
(package! use-package
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue