Install/compile packages in order of declaration

This should fix an issue where a package A, which uses macros from a
package B, is installed before package B, causing void-function errors.

The currently known and affected packages are neotree, parinfer, and
evil-collection.
This commit is contained in:
Henrik Lissner 2018-09-25 10:31:52 -04:00
parent 271e7689ae
commit 377dbae3fc
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 11 additions and 11 deletions

View file

@ -214,14 +214,12 @@ files."
objects, in the order of their `package! blocks.'"
(doom-initialize-packages)
(cl-remove-duplicates
(let (packages)
(dolist (name (append (mapcar #'car doom-packages) doom-core-packages))
(when-let* ((desc (cadr (assq name package-alist))))
(push (cons name desc) packages)
(cl-loop for dep in (package--get-deps name)
if (assq dep package-alist)
do (push (cons dep (cadr it)) packages))))
packages)
(cl-loop for name in (append doom-core-packages (mapcar #'car doom-packages))
if (assq name package-alist)
nconc (cl-loop for dep in (package--get-deps name)
if (assq dep package-alist)
collect (cons dep (cadr it)))
and collect (cons name (cadr it)))
:key #'car
:from-end t))
@ -332,7 +330,8 @@ Used by `doom-packages-install'."
(cl-loop for (name . plist)
in (doom-get-packages :ignored (if include-ignored-p 'any)
:disabled nil
:deps t)
:deps t
:sort nil)
if (and (or (plist-get plist :pin)
(not (package-built-in-p name)))
(or (not (doom-package-installed-p name))

View file

@ -26,7 +26,7 @@
(defun doom-packages-install (&optional auto-accept-p)
"Interactive command for installing missing packages."
(print! "Looking for packages to install...")
(let ((packages (reverse (doom-get-missing-packages))))
(let ((packages (doom-get-missing-packages)))
(cond ((not packages)
(print! (green "No packages to install!"))
nil)

View file

@ -131,7 +131,8 @@ them."
(cl-loop for key being the hash-keys of doom-modules
for path = (doom-module-path (car key) (cdr key) "packages.el")
do (let ((doom--current-module key)) (_load path t)))
(_load private-packages t))))))))
(_load private-packages t)
(setq doom-packages (reverse doom-packages)))))))))
;;