mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
fix(lib): ignore doom-compile-functions failures
It really isn't important if this function succeeds or not, but it seems its stability is highly variable, dependent on your specific build and version of Emacs. Since there are a lot of 29 Doom users, best to be more permissive and simply fall back to byte-compilation if native-comp fails.
This commit is contained in:
@ -253,18 +253,18 @@ TRIGGER-HOOK is a list of quoted hooks and/or sharp-quoted functions."
|
||||
"Queue FNS to be byte/natively-compiled after a brief delay."
|
||||
(with-memoization (get 'doom-compile-function 'timer)
|
||||
(run-with-idle-timer
|
||||
1 t (fn! (when-let ((fn (pop fns))
|
||||
(fndef (indirect-function fn)))
|
||||
(if (featurep 'native-compile)
|
||||
(unless (subr-native-elisp-p fndef)
|
||||
(doom-log "native-compile: Compiling %s" fn)
|
||||
(native-compile fn))
|
||||
(unless (byte-code-function-p fndef)
|
||||
(doom-log "byte-compile: Compiling %s" fn)
|
||||
(byte-compile fn))))
|
||||
(unless fns
|
||||
(cancel-timer (get 'doom-compile-function 'timer))
|
||||
(put 'doom-compile-function 'timer nil))))))
|
||||
1.5 t (fn! (when-let ((fn (pop fns))
|
||||
(fndef (indirect-function fn)))
|
||||
(doom-log "compile-functions: %s" fn)
|
||||
(or (if (featurep 'native-compile)
|
||||
(or (subr-native-elisp-p fndef)
|
||||
(ignore-errors (native-compile fn))))
|
||||
(byte-code-function-p fndef)
|
||||
(let (byte-compile-warnings)
|
||||
(byte-compile fn))))
|
||||
(unless fns
|
||||
(cancel-timer (get 'doom-compile-function 'timer))
|
||||
(put 'doom-compile-function 'timer nil))))))
|
||||
|
||||
|
||||
;;
|
||||
|
Reference in New Issue
Block a user