Commit bb4d316f authored by Robert P. Goldman's avatar Robert P. Goldman
Browse files

This test version shows the failure.

parent 96b9b8f4
Loading
Loading
Loading
Loading
+29 −2
Original line number Diff line number Diff line
@@ -10,9 +10,12 @@
;;(terpri)
(assert (asdf:find-system "test-asdf/force1"))

(DBG "Clearing the caches and finding.")
(defun clear-caches-and-search ()
  (setf asdf:*central-registry* nil)
(asdf/find-system:clear-defined-system "test-asdf/force1")
  (asdf/find-system:clear-defined-system "test-asdf/force1"))

(DBG "Clearing the caches and finding.")
(clear-caches-and-search)
(assert (not (asdf:find-system "test-asdf/force1" nil)))
(let (tried-once)
  (handler-bind
@@ -33,3 +36,27 @@
         ;; avoid infinite looping
         (error c)))))
 (asdf:find-system "test-asdf/force1")))

(DBG "Refinding test successful.")

(DBG "Now trying LOAD-SYSTEM with refinding.")
(clear-caches-and-search)
(let (tried-once)
  (handler-bind
   ((asdf:missing-dependency-of-version
     (lambda (c)
       ;; Nothing Quicklisp can do to recover from this, so
       ;; just resignal
       (error c)))
    (asdf:missing-dependency
     (lambda (c)
       (if (not tried-once)
           (let ((missing (asdf::missing-requires c)))
             (assert (equal missing "test-asdf/force1"))
             (setf tried-once t)
             (DBG "Trying to reset the central registry and retry.")
             (setf asdf:*central-registry* *old-registry*)
             (asdf:load-system missing))
         ;; avoid infinite looping
         (error c)))))
 (asdf:load-system "test-asdf/force1")))