Part 2 of 811099282.
The latest build of native-comp appears to eagerly load comp very early,
so defadvice! won't be defined when this block runs, causing this error.
This is commonly used in Emacs packages to resolve to a location in
`~/.emacs.d`, as storage or a cache. Rather than addressing each
file/directory variable as they are encountered, better to address this
at the source.
Also: this makes some file/directory settings redundant, so they were
removed.
Closes#4347
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.
Add an extra pass to `doom build` to queue native compilation of all
packages on `load-path`. This ensures that all core and site Elisp
packages are actually native-compiled, even on "fast boot" builds.
Add `.local/autolads.el` to the blacklist as native-compiling this file
succeeds, but prevents emacs from starting up.
Revise the evil-collection-vterm blacklist entry to use a more efficient
regex.
Fix a bug where an updated .error file wasn't always written, causing
spurious rebuilds.
Still a long way to go, but this introduces a few niceties for
debugging CLI failures:
+ The (extended) output of the last bin/doom command is now logged to
~/.emacs.d/.local/doom.log
+ If an error occurs, short backtraces are displayed whether or not you
have debug mode on. The full backtrace is written to
~/.emacs.d/.local/doom.error.log.
+ bin/doom now aborts with a warning if:
- The script itself or its parent directory is a symlink. It's fine if
~/.emacs.d is symlinked though.
- Running bin/doom as root when your DOOMDIR isn't in /root/.
- If you're sporting Emacs 26.1 (now handled in the elisp side rather
than the /bin/sh shebang preamble).
+ If a 'doom sync' was aborted prematurely, you'll be warned that Doom
was left in an inconsistent state and that you must run `doom sync`
again.
May address #3746
Inhibiting all MAJOR-MODE-hook functions (to fix#3660) would mean
inhibiting some useful functionality, like indentation or syntax
highlighting modes. We only want to inhibit expensive hooks. Since Doom
adds these to MAJOR-MODE-local-vars-hook by convention, we can
selectively inhibit those instead.