The dynamic attribute is set to true by default, so normally you would not have
to touch it, though I agree with you, I don't see any reason why you would ever
want to prevent the expansion of the "on" attribute.  It was a leftover from my
testing harness and I just never removed it.   I've included a new patch with
the dynamic attribute removed.

Let me know if you want any other changes.  Just so you know, I'm currently
snowed in and consequently not at the office, so I couldn't verify my snips, so
hopefully it still compiles.

James.


Quoting Scott Hernandez <[EMAIL PROTECTED]>:

> I'm inclined to put new tasks like this in NAntContrib. Does anyone have a
> major complaint about that? We can always move it later.
>
> As for your implementation; It seems okay. I'm a little confused about what
> you've done for the "on" attribute. It looks like you are not expanding,
> supporting expressions, for those values unless an additional attribute
> "dynamic" is set. What is the value in this?
>
> It would seem cleaner to me to just let the "on" attribute be auto-expanded.
>
> ----- Original Message -----
> From: "James C. Papp" <[EMAIL PROTECTED]>
>
>
> > DependsTask Patch
> >
> > Here is an implementation of the <depends/> task.  It allows the use of
> dynamic
> > dependencies which was possible with earlier versions of NAnt through the
> > <call/> task, but with current changes is now longer allowed (deprecation
> of
> > the force attribute).
> >
> > It is particularly useful for handling dependencies that change based on
> some
> > input conditions/parameters, or when the dependencies are not known until
> > runtime.
> >
> > Here's a quick example of the possibilities:
> >
> > <target name="foo">
> >   <if test="${some-option}">
> >     <depends on="A, B, ${set-at-runtime-target}/>
> >   </if>
> > </target>
> >
> > For more information about this, check out the thread: "[nant-dev] Change
> to
> > "call" task makes upgrade difficult"
> >
> >
>
http://www.mail-archive.com/nant-developers%40lists.sourceforge.net/msg03105.html
> >
> > Personally, I think it should be part of the core because it really is an
> > expansion of the <target/> depends attribute (they go hand-in-hand),
> however; I
> > would be just as happy if everyone decided to stick it in NAntContrib.
>
>

Attachment: DependsTask.zip
Description: Zip compressed data

Reply via email to