Add DOWNLOAD-SHELF restart for LOAD-SHELF, which allows interactive user to download shelf when some ASDF system is not found.
Wed May 20 13:33:27 PDT 2009 Maciej Pasternacki <maciej@pasternacki.net>
* Add DOWNLOAD-SHELF restart for LOAD-SHELF, which allows interactive user to download shelf when some ASDF system is not found.
diff -rN -u old-cl-librarian/src/shelves.lisp new-cl-librarian/src/shelves.lisp
--- old-cl-librarian/src/shelves.lisp 2014-07-28 15:38:27.000000000 -0700
+++ new-cl-librarian/src/shelves.lisp 2014-07-28 15:38:27.000000000 -0700
@@ -201,7 +201,12 @@
(defun load-shelf (shelf)
"Load shelf's root ASDF systems."
- (asdf-operate-on-shelf shelf 'asdf:load-op))
+ (restart-case (asdf-operate-on-shelf shelf 'asdf:load-op)
+ (download-shelf ()
+ :report (lambda (s) (format s "Download shelf ~A." shelf))
+ :test (lambda (c) (typep c 'asdf:missing-dependency))
+ (download-shelf shelf)
+ (asdf-operate-on-shelf shelf 'asdf:load-op))))
(defun shelf&repo-systems (shelf repo)
(mapcan #'(lambda (pathname)