Re: [PATCH] add a RETRY restart to the MISSING-DEPENDENCY error
Luis Oliveira <[email protected]> Sun, 15 Apr 2007 23:49:07 +0100
| Newsgroups | gmane.lisp.cclan.general |
|---|---|
| Message-ID | <[email protected]> |
Luis Oliveira <[email protected]> writes: > I've attached a modified patch [...] ... which has a huge bug. I've attached a fixed version. -- Luís Oliveira http://student.dei.uc.pt/~lmoliv/ ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ cclan-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cclan-list
component-load-retry-v3.patch
(text/x-patch, 2.3 KB)
Index: asdf.lisp =================================================================== RCS file: /cvsroot/cclan/asdf/asdf.lisp,v retrieving revision 1.107 diff -u -r1.107 asdf.lisp --- asdf.lisp 21 Mar 2007 22:08:33 -0000 1.107 +++ asdf.lisp 15 Apr 2007 22:45:27 -0000 @@ -652,18 +652,29 @@ (defgeneric traverse (operation component)) (defmethod traverse ((operation operation) (c component)) (let ((forced nil)) - (labels ((do-one-dep (required-op required-c required-v) - (let* ((dep-c (or (find-component - (component-parent c) - ;; XXX tacky. really we should build the - ;; in-order-to slot with canonicalized - ;; names instead of coercing this late - (coerce-name required-c) required-v) - (error 'missing-dependency :required-by c - :version required-v - :requires required-c))) - (op (make-sub-operation c operation dep-c required-op))) - (traverse op dep-c))) + (labels ((%do-one-dep (required-op required-c required-v) + (let* ((dep-c (or (find-component + (component-parent c) + ;; XXX tacky. really we should build the + ;; in-order-to slot with canonicalized + ;; names instead of coercing this late + (coerce-name required-c) required-v) + (error 'missing-dependency :required-by c + :version required-v + :requires required-c))) + (op (make-sub-operation c operation dep-c required-op))) + (traverse op dep-c))) + (do-one-dep (required-op required-c required-v) + (loop + (restart-case + (return (%do-one-dep required-op required-c required-v)) + (retry () + :report (lambda (s) + (format s "~@<Retry loading component ~S.~@:>" + required-c)) + :test (lambda (c) + (and (typep c 'missing-dependency) + (eql (missing-requires c) required-c))))))) (do-dep (op dep) (cond ((eq op 'feature) (or (member (car dep) *features*)