Currently ASDF is not very user-friendly. I can think about at least two
improvements: a separate function instead of (asdf:oos 'asdf:load-op :foo), and
asking for path when some library is not found. I tried to write a function
that solves both of these problems:
(defun load-lib (library)
"Loads a library using ASDF"
(handler-bind ((asdf:missing-component
(lambda (c)
(print-object c *standard-output*)
(format t "~%~%Enter the path of its possible location:")
(let ((path (read-line)))
(if (zerop (length path))
(invoke-restart 'abort-request) ;or (abort)
;in SLIME-less
;environment
(progn
(push path asdf:*central-registry*)
(invoke-restart 'asdf:retry)))))))
(asdf:oos 'asdf:load-op library)))
Unfortunately it doesn't work, because there is no RETRY restart available at
the time of searching through *central-registry*. At the time the
missing-component error occurs there is no way to fix it, without patching up
asdf.lisp. There must be another way, for example through
*system-definition-search-functions*. Or maybe it's better to encourage ASDF
developers to provide retry restart for the missing-component error?
_______________________________________________
Gardeners mailing list
[email protected]
http://www.lispniks.com/mailman/listinfo/gardeners