From 5eab7d44140092dcd5a1ee7669ac78e34c648ad1 Mon Sep 17 00:00:00 2001 From: Andrew Whatson Date: Wed, 25 Nov 2020 07:32:35 +1000 Subject: [PATCH 1/2] Bump straight.el raxod502/straight.el@0f283e2f -> raxod502/straight.el@3277e1c9 --- core/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/packages.el b/core/packages.el index 782a938cb..3768e9f8b 100644 --- a/core/packages.el +++ b/core/packages.el @@ -17,7 +17,7 @@ :branch ,straight-repository-branch :local-repo "straight.el" :files ("straight*.el")) - :pin "0f283e2f92c106d5bbb558862d433954fc8db179") + :pin "3277e1c9648b41dd5bfb239c067b8374ed2ec2bb") ;; core-modules.el (package! use-package From d3e08c5d0bffacdd00136158b2b0383a2cd258e4 Mon Sep 17 00:00:00 2001 From: Andrew Whatson Date: Tue, 24 Nov 2020 10:09:20 +1000 Subject: [PATCH 2/2] 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. --- core/cli/packages.el | 7 +++++-- core/core.el | 17 ++++++++++++++++- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/core/cli/packages.el b/core/cli/packages.el index 3eece0e0f..b141589ac 100644 --- a/core/cli/packages.el +++ b/core/cli/packages.el @@ -225,9 +225,12 @@ list remains lean." collect path) for file in (doom-files-in paths :match "\\.el\\(?:\\.gz\\)?$") 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) - (native-compile-async file nil 'late)))) + (native-compile-async file)))) (defun doom--bootstrap-trampolines () "Build the trampolines we need to prevent hanging." diff --git a/core/core.el b/core/core.el index d1b49d1f3..b3f3c5b00 100644 --- a/core/core.el +++ b/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))) ;;