Proposed patch to add a better docstring for component-depends-on
Robert Goldman <[email protected]>
| Newsgroups | gmane.lisp.cclan.general |
|---|---|
| Message-ID | <[email protected]> |
Here's a patch that doesn't change the behavior of asdf.lisp, but that offers a much better (certainly better than nothing!) documentation string for the defgeneric of component-depends-on. Collaborative effort from #lisp today.... I have a not-so-secret hope that we could end up with a version of asdf that's entirely decorated with docstrings where appropriate. Best, Robert ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ cclan-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cclan-list
component-depends-on-docstring.diff
(text/x-patch, 1.4 KB)
Index: asdf.lisp
===================================================================
RCS file: /cvsroot/cclan/asdf/asdf.lisp,v
retrieving revision 1.103
diff -b -u -F^(def -r1.103 asdf.lisp
--- asdf.lisp 21 Jan 2007 14:09:51 -0000 1.103
+++ asdf.lisp 23 Jan 2007 03:28:47 -0000
@@ -557,7 +557,25 @@ (defmethod component-visiting-p ((o oper
(member node (operation-visiting-nodes (operation-ancestor o))
:test 'equal)))
-(defgeneric component-depends-on (operation component))
+(defgeneric component-depends-on (operation component)
+ (:documentation
+ "Returns a list of dependencies needed by the component to perform
+ the operation. A dependency has one of the following forms:
+
+ (<operation> <component>*), where <operation> is a class
+ designator and each <component> is a component
+ designator, which means that the component depends on
+ <operation> having been performed on each <component>; or
+
+ (FEATURE <feature>), which means that the component depends
+ on <feature>'s presence in *FEATURES*.
+
+ Methods specialized on subclasses of existing component types
+ should usually append the results of CALL-NEXT-METHOD to the
+ list."))
+
+(defmethod component-depends-on ((op-spec symbol) (c component))
+ (component-depends-on (make-instance op-spec) c))
(defmethod component-depends-on ((o operation) (c component))
(cdr (assoc (class-name (class-of o))