Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Be more selective about what errors trigger missing dependency autolo…

…ads.

asdf-utils failed because of a missing dependency on ASDF, but it
wasn't just ASDF, but a particular version of ASDF. Quicklisp didn't
distinguish the error correctly and kept trying (and succeeding) to
load an ASDF that did not satisfy the dependency.

This is fixed in two ways.

First, handle the ASDF:MISSING-DEPENDENCY-OF-VERSION error, and
resignal it instead of trying to autoload the dependency it describes.

Second, keep track of which dependencies have been loaded already, and
signal an error if a loop appears.

Fixes quicklisp/quicklisp-projects#352
  • Loading branch information...
commit d925de1169a255be19e790cdf910b61c77b87ae2 1 parent 24a151a
@xach xach authored
Showing with 15 additions and 2 deletions.
  1. +15 −2 setup.lisp
View
17 setup.lisp
@@ -156,20 +156,33 @@
(asdf:oos 'asdf:load-op (name strategy) :verbose nil))))
(defun autoload-system-and-dependencies (name &key prompt)
+ "Try to load the system named by NAME, automatically loading any
+Quicklisp-provided systems first, and catching ASDF missing
+dependencies too if possible."
(setf name (string-downcase name))
(with-simple-restart (abort "Give up on ~S" name)
- (let ((strategy (compute-load-strategy name)))
+ (let ((strategy (compute-load-strategy name))
+ (tried-so-far (make-hash-table :test 'equalp)))
(show-load-strategy strategy)
(when (or (not prompt)
(press-enter-to-continue))
(tagbody
retry
(handler-bind
- ((asdf:missing-dependency
+ ((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)
(let ((parent (asdf::missing-required-by c))
(missing (asdf::missing-requires c)))
(when (typep parent 'asdf:system)
+ (if (gethash missing tried-so-far)
+ (error "Dependency looping -- already tried to load ~
+ ~A" missing)
+ (setf (gethash missing tried-so-far) missing))
(autoload-system-and-dependencies missing
:prompt prompt)
(go retry))))))
Please sign in to comment.
Something went wrong with that request. Please try again.