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:
parent
58c0de6841
commit
3ba56eb008
1 changed files with 12 additions and 12 deletions
|
@ -253,14 +253,14 @@ 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))
|
||||
1.5 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)
|
||||
(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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue