Make doom-get-outdated-packages synchronous
Concurrency doesn't speed this up enough to justify its problems. It swallows errors emitted from the child processes and a child process can block indefinitely.
This commit is contained in:
parent
c6fc47cc8d
commit
cb172becd9
1 changed files with 7 additions and 39 deletions
|
@ -315,45 +315,13 @@ If INCLUDE-FROZEN-P is non-nil, check frozen packages as well.
|
||||||
|
|
||||||
Used by `doom-packages-update'."
|
Used by `doom-packages-update'."
|
||||||
(doom-refresh-packages-maybe doom-debug-mode)
|
(doom-refresh-packages-maybe doom-debug-mode)
|
||||||
(let-alist
|
(cl-loop for package in (mapcar #'car package-alist)
|
||||||
(seq-group-by
|
when (and (or (not (doom-package-prop package :freeze 'eval))
|
||||||
#'doom-package-backend
|
include-frozen-p)
|
||||||
(cl-loop for package in (mapcar #'car package-alist)
|
(not (doom-package-prop package :ignore 'eval))
|
||||||
when (and (or (not (doom-package-prop package :freeze 'eval))
|
(not (doom-package-different-backend-p package))
|
||||||
include-frozen-p)
|
(doom-package-outdated-p package))
|
||||||
(not (doom-package-prop package :ignore 'eval))
|
collect it))
|
||||||
(not (doom-package-different-backend-p package)))
|
|
||||||
collect package))
|
|
||||||
;; The bottleneck in this process is quelpa's version checks, so check them
|
|
||||||
;; asynchronously.
|
|
||||||
(cl-loop with partitions = (min 2 (/ (length .quelpa) 4))
|
|
||||||
for package-list in (seq-partition .quelpa partitions)
|
|
||||||
do (doom-log "New thread for: %s" package-list)
|
|
||||||
collect
|
|
||||||
(async-start
|
|
||||||
`(lambda ()
|
|
||||||
(let ((gc-cons-threshold ,doom-gc-cons-upper-limit)
|
|
||||||
(doom-init-p t)
|
|
||||||
(noninteractive t)
|
|
||||||
(load-path ',load-path)
|
|
||||||
(package-alist ',package-alist)
|
|
||||||
(package-archive-contents ',package-archive-contents)
|
|
||||||
(package-selected-packages ',package-selected-packages)
|
|
||||||
(doom-packages ',doom-packages)
|
|
||||||
(doom-modules ',doom-modules)
|
|
||||||
(quelpa-cache ',quelpa-cache)
|
|
||||||
(user-emacs-directory ,user-emacs-directory)
|
|
||||||
doom-private-dir)
|
|
||||||
(load ,(expand-file-name "core.el" doom-core-dir))
|
|
||||||
(load ,(expand-file-name "autoload/packages.el" doom-core-dir))
|
|
||||||
(require 'package)
|
|
||||||
(require 'quelpa)
|
|
||||||
(delq nil (mapcar #'doom-package-outdated-p ',package-list)))))
|
|
||||||
into futures
|
|
||||||
finally return
|
|
||||||
(append (delq nil (mapcar #'doom-package-outdated-p .elpa))
|
|
||||||
(mapcan #'async-get futures)
|
|
||||||
nil))))
|
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom-get-orphaned-packages ()
|
(defun doom-get-orphaned-packages ()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue