Build package autoloads in install order #374

Before this update, the autoloads files were collected in
lexicographical order (by traversing straight's build directory). By
using straight--build-cache's keys (which are entered in the order they
were registered) we avoid issues like
This commit is contained in:
Henrik Lissner 2019-07-23 21:54:50 +02:00
parent 629249aa43
commit ba990a6c9d
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -312,7 +312,7 @@ Run this whenever your `doom!' block, or a module autoload file, is modified."
(defun doom--generate-package-autoloads ()
"Concatenates package autoload files, let-binds `load-file-name' around
them,and remove unnecessary `provide' statements or blank links."
(dolist (pkg (straight--directory-files (straight--build-dir)))
(dolist (pkg (hash-table-keys straight--build-cache))
(unless (member pkg doom-autoload-excluded-packages)
(let ((file (straight--autoloads-file pkg)))
(when (file-exists-p file)