          ,@(nreverse load-forms))
        ,(unless doom--initializing
           '(unless noninteractive
+             (doom--refresh-cache)
              (doom-initialize-modules))))))
 
 (defmacro def-package! (name &rest plist)


(defun doom--refresh-cache ()
  "TODO"
  (doom-initialize-packages 'internal)
  (unless noninteractive
    (with-temp-buffer
      (prin1 `(setq load-path ',load-path
                    Info-directory-list ',Info-directory-list
                    doom-disabled-packages ',doom-disabled-packages)
             (current-buffer))
      (write-file doom-packages-file))))

(defun doom-initialize (&optional force-p)
  "Bootstrap the bare essentials to get Doom running, if it hasn't already. If

              (error "✕ Couldn't install %s" package)))
          (message "Installing core packages...done")))
      (cl-pushnew doom-core-dir load-path :test #'string=)
      (setq doom--init-cache-p t))
    (setq doom-init-p t)))

(defun doom-initialize-autoloads ()
