The first is dangerous because when a programmer decides to change some
build.config's to build.local.config (for example) they are guaranteed
at some point to miss one. Not every time. Not even very often. Just
often enough for the failure to be costly. 

<property name="build.local.config" value="Bananafanafofana"
unless="${property::exists('build.config')}" />

If there's one place that I expect a maximum amount of robustness it's
in my build scripts. FMEA (Failure Modes and Effects Analysis) would
tell you that the "overwrite" option will remove this cause of failures,
and that the failures may not be that easy to track down.

If the word "overwrite" is confusing, may I suggest a new option be put
in its place that has the same effect, such as "overwriteexisting", or
"lookmeupinthemanual".

Jamie

-----Original Message-----
From: Troy Laurin [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 25, 2005 9:33 PM
To: Jamie Briant
Cc: nant-developers@lists.sourceforge.net
Subject: Re: [nant-dev] property overwrite attrib

Jamie Briant wrote:

> Does this not seem outstandingly dangerous to anyone?
> 
>  
> 
>     <property name="build.config" value="Bananafanafofana" 
> unless="${property::exists('build.config')}" />
> 
>  
> 
> Its just asking for errors where only one of the "build.config"'s is 
> changed. Is there a good reason that the following is deprecated?
> 
>  
> 
>     <property name="build.config" value="Bananafanafofana" 
> overwrite="false" />
> 

James,

I'm not sure why the first would be dangerous but the second not... they

are functionally identical!

That's actually why the 'overwrite' attribute has been deprecated... it 
is a widely misunderstood property, and the unless test is considered 
much more explicit in its intent.  That is, set this property unless 
it's already set.  A default value, if you will.


Regards,

-- Troy


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to