Update for the latest native-compile-async API
Renamed `comp-deferred-compilation-black-list` to `comp-deferred-compilation-deny-list`. Removed the `late` load flag which is no longer required. Added a check against the deny list when compiling all Elisp on the load-path, so we don't inadvertently compile something we shouldn't. Added compatibility shims to ease transition from older builds of native-comp.
This commit is contained in:
parent
5eab7d4414
commit
d3e08c5d0b
2 changed files with 21 additions and 3 deletions
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/")))
|
||||
|
||||
(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
|
||||
(dolist (entry (list (concat "\\`" (regexp-quote doom-local-dir) ".*/evil-collection-vterm\\.el\\'")
|
||||
;; https://github.com/nnicandro/emacs-jupyter/issues/297
|
||||
(concat "\\`" (regexp-quote doom-local-dir) ".*/jupyter-channel\\.el\\'")
|
||||
(concat "\\`" (regexp-quote doom-local-dir) ".*/with-editor\\.el\\'")
|
||||
(concat "\\`" (regexp-quote doom-autoloads-file) "'")))
|
||||
(add-to-list 'comp-deferred-compilation-black-list entry)))
|
||||
(add-to-list 'comp-deferred-compilation-deny-list entry)))
|
||||
|
||||
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue