       (let ((version (read (current-buffer)))
             (find-flavor (read (current-buffer)))
             (cache (read (current-buffer)))
-            (packages (read (current-buffer))))
+            (eager-packages (read (current-buffer)))
+            (live-repos nil))
+        ;; After the main data structures comes a list of other local
+        ;; repositories that were detected by live modification
+        ;; checking. Why aren't these a list? Well, the live
+        ;; modification checker needs to be very fast, so this allows
+        ;; it to operate by just appending to the file rather than
+        ;; regenerating it.
+        (ignore-errors
+          (while t
+            (push (read (current-buffer)) live-repos)))
+        ;; We might end up in a situation where multiple Emacs
+        ;; sessions push the same package to build-cache.el, so we'll
+        ;; get rid of those for the sake of cleanliness.
+        (setq live-repos (delete-dups live-repos))
         (unless (and
                  ;; Format version should be the symbol currently in
                  ;; use.

  (advice-add #'package--save-selected-packages :override
              #'straight--advice-neuter-package-save-selected-packages))

;;;; use-package integration

(when straight-enable-use-package-integration


RECIPE should be a straight.el-style plist. The build mtime and
recipe in `straight--build-cache' for the package are updated."
  (straight--with-plist recipe
      (package local-repo)
    (let (;; This time format is compatible with:
          ;;
          ;; * BSD find shipped with macOS >=10.11
          ;; * GNU find >=4.4.2
          (mtime (straight--format-timestamp)))
      (straight--insert 0 package mtime straight--build-cache))
    (straight--insert 2 package recipe straight--build-cache)
    (setq straight--live-modified-repos
          (delete local-repo straight--live-modified-repos))))

;;;;; Main entry point

