The reason, please correct me in my memory is off, for the deprecation of
the "force" attribute was because of the change to the <call/> task to do
this by default. The idea was that if you want the behavior of dependencies,
you will use that mechanism (via the depends attribute of the target), but
if you want a target (and its dependencies) executed, you will use the
<call/> task.
I believe this change was also made to more closely match the Ant behavior
of <call/>.
In hindsight, and even a little at the time, it seems like you may want some
middle ground too. When you go to execute a target, a chain of all dependant
targets is built (and reduced to unique targets). If the target to execute
is via the command line, or a depends reference, then they are not forced.
If they are executed from the <call/> task, then all of the targets are
executed. The middle ground is the example you sight below:
<call target="foo" unless="target::has-executed('foo')
forcedepends="false"/>
In this case you want to only execute if the target ("foo") hasn't executed
yet, and you want to do the same with all dependencies.
Now, the example of <call target="foo" force="false"/> is a little
ambiguous. Do you mean, don't force "foo" (meaning only execute if it hasn't
yet), or don't force all the dependencies, or both? Would your <depends
on=""/> not force any executions?
Not to put Gert on the spot, but I think he may remember all this stuff a
little more vividly than I. I think he was the once to deprecate <call
force=""/>.
Now that I'm thinking about this, maybe the depends stuff should work so
that if anything you depend on executes again, your previous executions
should be ignored.
----- Original Message -----
From: "James C. Papp" <[EMAIL PROTECTED]>
> Though..., I'm not sure how a forcedepends flag would help, since isn't
that
> what call does now? So..., I guess the forcedepends flag would be set to
true
> by default, and if set to false, it will only execute dependent tasks if
they
> have not already been executed. But this would not affect the top-level
task
> being called, then to get the same behavior of the <depends/> task you
would
> need to do something like this:
>
> <call target="foo" unless="target::has-executed('foo')
forcedepends="false"/>
>
> This seems like it might be more confusing and little more prone to error
then
> just reintroducing the force flag, then you can simply say:
>
> <call target="foo" force="false"/>
>
> which would do the same thing as <depends on="foo"/>, though you would not
be
> able to do <depends on="A,B,C"/> without using multiple <call/> tasks, but
> that's not a big deal.
>
> Maybe I should ask why the force flag functionality was removed instead of
just
> being fixed.
>
> Does anyone else have an opinion on this?
>
> James.
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers