----- Original Message ----- From: "Gary Feldman" <[EMAIL PROTECTED]> Cc: <nant-users@lists.sourceforge.net> Sent: Tuesday, August 23, 2005 3:40 PM Subject: Re: [Nant-users] "if" attribute on mkdir ignored
> Gert Driesen wrote: > > >----- Original Message ----- > >From: <[EMAIL PROTECTED]> > > > > > > > >>... > >><mkdir dir="${empty}" > >>if="${string::get-length(empty) != 0}" /> > >>... > >> > >>BUILD FAILED > >> > >>C:\Projects\Eden4All\test.build(6,4): > >>An empty string is not a valid value for attribute 'dir' of <mkdir > >>... />. > >>... > >> > >The value of the if/unless attribute is not evaluated before the > >initialization of other attributes or child elements, hence you still get > >build errors when you specify invalid values for these other attributes. > > > >I'm not sure if this is something we should change. > > > > > What are the arguments in favor of not changing it? This issue comes up > fairly frequently, not just for the mkdir task. That indicates that > many people expect the if attribute to be evaluated before any other > attribute. Shouldn't that be the rule, applicable to all tasks, with no > exceptions? I agree that it might indeed have been better, but these attributes are not available for all elements (only for tasks, and some individual elements) which would mean that you'd need a specific attributeconfigurator for this. We could move the if/unless attributes (properties) from Task to Element, but not all elements really need these attributes to be exposed. Also, I'm not sure if it wouldn't break backward compatibility if we suddenly stop initializing elements/tasks that should not be processed. Right now, tasks can choose to ignore the if/unless attribute. I'm not saying this is a good thing, ofcourse. Gert ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ Nant-users mailing list Nant-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users