DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=27116>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=27116

Imported target depends not preserved when overridden





------- Additional Comments From [EMAIL PROTECTED]  2004-03-17 01:01 -------
I'm not convinced the OO analogy is properly drawn.  In the context of a 
framework, a polymorphic call to a method will be dispatched to the most 
derived implementation.  That implementation has the option of calling super, 
but in general if it doesn't it *should* still fulfill the "contract" of the 
super class even though this isn't always enforceable.

No if you view depends as shorthand for doing a sort of checked <antcall> at 
the start of the method, then I'd agree that the depends declarations are part 
of the super's implementation and shouldn't be honored unless the overriding 
target calls to overridden target.

However, since depends is handled magically inside of the project for ordering 
of tasks it doesn't behave as simply as a checked <antcall>; it can't be 
simulated using ant task, thus you can argue that it's not part of the 
overridable task's behavior but rather part of the ant "language" and should be 
honored regardless of what the overriding target implementation does.

Of course, this begs the question that Matt raises, "what does it mean when you 
specify dependencies on the overriding target?"  Since dependencies are used 
for ordering and not exclusion, you should be able to union the two tasks 
dependencies.  If there's no intersection in these lists and the dependency 
graph doesn't clearly drive a particular ordering of dependencies, then the 
result could be either (a) indeterminate/random/undefined or (b) overridden 
target's dependencies run first, then the overriding targets run next.

I haven't dug into the mail archives, but it seems that the intent of <import> 
is to get the behavior I describe.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to