On Fri, Sep 25, 2015 at 6:06 PM, Zach Beane <
xa...@xach.com> wrote:
> I'm interested in both. The former is complicated by the fact that the
> right condition object is not as easily available as a normal
> :depends-on. The latter is, I think, a SMOP.
OK. Here's an initial attempt to get Quicklisp to download
systems named by :defsystem-depends-on. With this patch,
I can load some toy examples which name Quicklisp systems
which are not already installed.
$ diff -u setup.lisp-original setup.lisp
--- setup.lisp-original 2015-09-28 23:44:30.260979530 -0700
+++ setup.lisp 2015-09-29 15:29:05.137758129 -0700
@@ -61,12 +61,19 @@
system given to load is not available via ASDF or a Quicklisp
dist."))
+(defun asdf-find-system-try-harder (name)
+ (handler-bind
+ ((asdf::load-system-definition-error
+ #'(lambda (c) (ql:quickload (asdf::missing-requires
(asdf::error-condition c)))
+ (invoke-restart 'asdf::reinitialize-source-registry-and-retry))))
+ (asdf:find-system name nil)))
+
(defun compute-load-strategy (name)
(setf name (string-downcase name))
(let ((asdf-systems '())
(quicklisp-systems '()))
(labels ((recurse (name)
- (let ((asdf-system (asdf:find-system name nil))
+ (let ((asdf-system (asdf-find-system-try-harder name))
(quicklisp-system (find-system name)))
(cond (asdf-system
(push asdf-system asdf-systems))
No doubt I've broken all kinds of conventions about how
things are supposed to work and overlooked all kinds of
special cases. Perhaps you can give me some hints to
steer this in the direction of getting something to work.
best,
Robert Dodier