Hi,

On Thu, Mar 4, 2010 at 9:49 PM, Gert Driesen <gert.drie...@telenet.be> wrote:
> Hi Charles,
>
> The docs clearly state that the dependent targets are always executed
> (first):
>
> "Note: the dependencies of a target are always executed before testing the
> target's condition."
> Source:
> http://nant.sourceforge.net/release/latest/help/fundamentals/targets.html
>
> This makes sense, you actually may want to use the dependent targets to set
> a property which controls whether the conditional target is executed.
>
> <target name="clean-registry" depends="determine-platform-capabilities"
> if="${platform.supports.registry}">
>        ...
> </target>
>
> In case of the NAnt build file: the proper way to deal with this is to fix
> the performance issue on Mono.
> But I'm afraid that'll take some time (find the problem, fix it, and then
> wait for the fix to be included in a release).
>

Ok, if no one minds, I would like to look into this further.

> Regards,
>
> Gert
>
> -----Original Message-----
> From: Charles Chan [mailto:cchan...@users.sourceforge.net]
> Sent: vrijdag 5 maart 2010 4:26
> To: Ryan Boggs
> Cc: Gert Driesen; nant-developers@lists.sourceforge.net
> Subject: Re: [nant-dev] Task/planning for 0.87 release
>
> Hello Ryan,
>
> Thanks for looking into this. Yeah I follow what you are saying (but I
> couldn't really test it ... see my other post.)
>
> The question basically comes down to this: If the target has a conditional
> expression. What order is it evaluated in? (I checked the NAnt doc. but it
> did not specify this clearly.)
>
> eg.
>    <target name="install-windows" depends="userdoc"
> if="${platform::is-win32()}">
>
> Base on your comments, right now, the depends target is executed BEFORE the
> condition is tested on a Linux system.
>
> Logically, however, if the condition expression is false, then the current
> target is not going to be executed, and in this case, neither should the
> depends target.
>
> So ... to ensure .build scrips are executed as efficiently as possible,
> yeah, I agree in this case it probably *should* be fixed. ie. only execute
> the depends and target IFF if/unless attribute tests is true.
>
> On the other hand, since I don't know the history behind this, I would like
> to listen to what the senior developers have to say first. This behavior
> might be used in production and my concern is that changing it now might
> affect these users during an upgrade -- even if it was a bug in the
> software.
>
> Regards,
> Charles
>
> --- On Fri, 3/5/10, Ryan Boggs <rmboggs.obsd.po...@gmail.com> wrote:
>
>> From: Ryan Boggs <rmboggs.obsd.po...@gmail.com>
>> Subject: Re: [nant-dev] Task/planning for 0.87 release
>> To: "cchan...@users.sourceforge.net" <cchan...@users.sourceforge.net>
>> Cc: "Gert Driesen" <gert.drie...@telenet.be>,
> "nant-developers@lists.sourceforge.net"
> <nant-developers@lists.sourceforge.net>
>> Received: Friday, March 5, 2010, 1:35 AM
>> Hi,
>>
>> Me again.  I noticed something in the current
>> NAnt.build file that may
>> be causing the massive *nix delay, or at least making it
>> worse.  The
>> install target on line 822, which I believe is being called
>> by
>> (n)make, lists two depending targets called install-windows
>> and
>> install-linux.  Looking at these targets, only the
>> install-windows
>> depends on the userdoc target which takes 30 minutes to run
>> on
>> Mono/*nix.  The install-linux target only depends on
>> the build target.
>>  As a test, I removed the install-windows target from the
>> install
>> target depends list and reran on Linux.  NAnt was
>> installed in less
>> than 5 minutes.  This makes me think that NAnt is
>> building the target
>> depends before it is checking the target's if
>> statement.  If that is
>> true, is this functionality intended?  I would think
>> that the if
>> statement would need to be checked prior to running the
>> depended
>> targets.
>>
>> Hope this makes sense.
>>
>> Thanks,
>> Ryan
>
>
>
>      __________________________________________________________________
> Looking for the perfect gift? Give the gift of Flickr!
>
> http://www.flickr.com/gift/
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 9.0.733 / Virus Database: 271.1.1/2722 - Release Date: 03/04/10
> 20:34:00
>
>



-- 
Thanks,
Ryan

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to