mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Improve 'doom build' reporting & checks
- Fix 'doom build' not byte-compiling stale dependencies of rebuilt packages. - Fix 'doom build' logging the wrong number of packages that were rebuilt.
This commit is contained in:
@ -113,11 +113,17 @@ a list of packages that will be installed."
|
|||||||
if (and (file-exists-p elc-file)
|
if (and (file-exists-p elc-file)
|
||||||
(file-newer-than-file-p file elc-file))
|
(file-newer-than-file-p file elc-file))
|
||||||
return t))
|
return t))
|
||||||
(let ((straight--packages-to-rebuild :all)
|
(let ((straight-use-package-pre-build-functions
|
||||||
(straight--packages-not-to-rebuild (make-hash-table :test #'equal)))
|
straight-use-package-pre-build-functions))
|
||||||
(straight-use-package (intern package) nil nil " "))
|
(add-hook 'straight-use-package-pre-build-functions
|
||||||
(straight--byte-compile-package recipe)
|
(lambda (&rest _) (cl-incf n)))
|
||||||
(cl-incf n))))))
|
(let ((straight--packages-to-rebuild :all)
|
||||||
|
(straight--packages-not-to-rebuild (make-hash-table :test #'equal)))
|
||||||
|
(straight-use-package (intern package) nil nil " "))
|
||||||
|
(straight--byte-compile-package recipe)
|
||||||
|
(dolist (dep (straight--get-dependencies package))
|
||||||
|
(when-let (recipe (gethash dep straight--recipe-cache))
|
||||||
|
(straight--byte-compile-package recipe)))))))))
|
||||||
(if (= n 0)
|
(if (= n 0)
|
||||||
(ignore (print! (success "No packages need rebuilding")))
|
(ignore (print! (success "No packages need rebuilding")))
|
||||||
(doom--finalize-straight)
|
(doom--finalize-straight)
|
||||||
|
Reference in New Issue
Block a user