doomemacs/lisp/cli
Henrik Lissner 5a5195b84d
fix: add :depth field to modules
This introduces a depth field for modules so that they may dictate their
load order explicitly, it also treats depths <= -100 or >= 100 as
special depths, which will be loaded early, before their respective
doom-{before,after}-module-{init,config}-hook. This permits psuedo
modules like :core and :user modules to be treated as normal modules
without too many special cases.

This also fixes a module load order issue on Emacs 29 (#6813), caused by
emacs-mirror/emacs@4311bd0bd7, which changed the return value order of
hash-table-{keys,values} causing modules to be loaded in reverse order;
resulting in the loss of evil keybinds, among other things.

Other notable changes:
- Changes the data structure for module data caches from a list to a
  vector. Uses less memory and permits faster lookups. Also adds two
  depth fields to the front of it.
- Changes the signature of doom-module-list and doom-package-list.
- Renames doom--read-packages -> doom-packages--read for consistency
  with naming convention.
- Add doom-module-depth function.
- Adds a temporary doom-core-dir/init.el file, which is responsible for
  loading doom-*.el.

Fix: #6813
Ref: emacs-mirror/emacs@4311bd0bd7
2022-09-24 18:46:21 +02:00
..
make refactor!: restructure Doom core 2022-07-30 22:41:13 +02:00
ci.el nit: revise comments, reformat config sections 2022-09-16 01:14:21 +02:00
compile.el fix(cli): remove vestigial doom-initialize-modules calls 2022-09-16 13:07:28 +02:00
doctor.el fix: add :depth field to modules 2022-09-24 18:46:21 +02:00
env.el fix(cli): remove redundant doom-env-file 2022-09-16 17:06:49 +02:00
help.el nit: minor comment revision and refactors 2022-09-16 17:01:57 +02:00
info.el refactor!: restructure Doom core 2022-07-30 22:41:13 +02:00
install.el fix(cli): remove vestigial doom-initialize-modules calls 2022-09-16 13:07:28 +02:00
make.el refactor!(cli): rename cli definers for consistency 2022-09-12 11:45:59 +02:00
packages.el perf: disable autoload-compute-prefixes & optimize var cache 2022-09-20 01:43:33 +02:00
profiles.el feat(cli): introduce DOOMPROFILELOAD{FILE,PATH} envvars 2022-09-18 00:28:13 +02:00
run.el fix(cli): link $XDG_*_HOME to fake $HOME for doom run 2022-09-18 13:55:47 +02:00
sync.el fix(cli): type error trying to split a cons cell 2022-09-17 21:41:42 +02:00
test.el refactor!(cli): rename cli definers for consistency 2022-09-12 11:45:59 +02:00
upgrade.el fix(cli): more future resistant 'doom upgrade' 2022-07-31 00:58:36 +02:00