[PATCH] COMPONENT-DEPENDS-ON and operation subclasses
Richard M Kreuter <[email protected]> Fri, 07 Nov 2008 09:31:09 -0500
| Newsgroups | gmane.lisp.cclan.general |
|---|---|
| Message-ID | <[email protected]> |
--=-=-=
Hello,
The method of COMPONENT-DEPENDS-ON specializing on OPERATION and
COMPONENT doesn't do what I'd expect when the operation is an indirect
instance of an operation class in a component's IN-ORDER-TO slot.
Here's an example involving two SBCL contribs with an inter-system
dependency:
* (asdf:find-system "sb-md5")
#<ASDF:SYSTEM "sb-md5" {10024D6DC1}>
* (asdf:component-depends-on (make-instance 'asdf:load-op)
(asdf:find-system "sb-md5"))
((ASDF:COMPILE-OP "sb-md5") (ASDF:LOAD-OP SB-MD5-SYSTEM::SB-ROTATE-BYTE))
* (defclass my-load-op (asdf:load-op) ())
#<STANDARD-CLASS MY-LOAD-OP>
* (asdf:component-depends-on (make-instance 'my-load-op)
(asdf:find-system "sb-md5"))
((ASDF:COMPILE-OP "sb-md5"))
The net effect is that subclasses of operation classes don't inherit
dependency behavior; in the example above, MY-LOAD-OP isn't able to load
sb-md5, because sb-rotate-byte doesn't get loaded. I think it would
make sense for operation subclasses to inherit dependency behavior
(patch attached), but maybe there's some reason why they don't. Can
anybody think up a story under which the current implementation is the
right thing?
Thanks,
Richard
--=-=-=
Content-Disposition: attachment; filename=asdf.diff
Content-Description: Fix COMPONENT-DEPENDS-ON's behavior for subclasses.
--- asdf.lisp 15 Oct 2008 18:56:08 -0000 1.130
+++ asdf.lisp 7 Nov 2008 14:22:46 -0000
@@ -640,8 +640,7 @@
(component-depends-on (make-instance op-spec) c))
(defmethod component-depends-on ((o operation) (c component))
- (cdr (assoc (class-name (class-of o))
- (slot-value c 'in-order-to))))
+ (cdr (assoc o (slot-value c 'in-order-to) :test #'typep)))
(defgeneric component-self-dependencies (operation component))
--=-=-=
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
--=-=-=
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
cclan-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cclan-list
--=-=-=--