added a recompile restart to ASDF
Gary King <[email protected]> Sun, 6 Apr 2008 14:16:22 -0400
| Newsgroups | gmane.lisp.cclan.general |
|---|---|
| Message-ID | <[email protected]> |
This has been working for me... It adds a "try recompiling" restart to
the load operation. Are there issues I'm missing or would this be a
good thing to add...
(defmethod perform :around ((o load-op) (c cl-source-file))
(let ((state :initial))
(loop until (or (eq state :success)
(eq state :failure)) do
(case state
(:recompiled
(setf state :failure)
(call-next-method)
(setf state :success))
(:failed-load
(setf state :recompiled)
(perform (make-instance 'asdf:compile-op) c))
(t
(with-simple-restart
(:try-recompiling "Recompile ~a and try loading it again"
(component-name c))
(setf state :failed-load)
(call-next-method)
(setf state :success)))))))
--
Gary Warren King, metabang.com
Cell: (413) 559 8738
Fax: (206) 338-4052
gwkkwg on Skype * garethsan on AIM
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Register now and save $200. Hurry, offer ends at 11:59 p.m.,
Monday, April 7! Use priority code J8TLD2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone