Skip to content

Commit 0b4023b

Browse files
authored
Merge pull request #1187 from radian-software/rr-cache-earlier
[#1186] Load build cache earlier
2 parents 483b205 + b89c950 commit 0b4023b

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

straight.el

+9-5
Original file line numberDiff line numberDiff line change
@@ -5887,6 +5887,15 @@ Return non-nil when package is initially installed, nil otherwise."
58875887
straight--repo-cache)
58885888
(lambda (pkg) (not (member pkg installed)))))
58895889
nil nil nil 'interactive))
5890+
;; Do this unconditionally, at the very beginning, because we want
5891+
;; to have caches loaded right away - they're needed even for
5892+
;; `straight--convert-recipe', to populate the recipe lookup cache.
5893+
;;
5894+
;; Even for packages with `no-build' enabled, we will want the cache
5895+
;; later, as well, since for those packages we still want to check
5896+
;; for modifications and (if any) invalidate the relevant entry in
5897+
;; the recipe lookup cache.
5898+
(straight--make-build-cache-available)
58905899
(let ((recipe (straight--convert-recipe
58915900
(or
58925901
(straight--get-overridden-recipe
@@ -5956,11 +5965,6 @@ Return non-nil when package is initially installed, nil otherwise."
59565965
;; We didn't decide to abort, and the repository still
59575966
;; isn't available. Make it available.
59585967
(straight--clone-repository recipe cause))
5959-
;; Do this even for packages with `no-build' enabled, as we
5960-
;; still want to check for modifications and (if any)
5961-
;; invalidate the relevant entry in the recipe lookup
5962-
;; cache.
5963-
(straight--make-build-cache-available)
59645968
(let* ((no-build
59655969
(or
59665970
;; Remember that `no-build' can come both from the

0 commit comments

Comments
 (0)