Re: Next NAnt/NAntContrib TODO Tasks
Rob Richardson <[email protected]> Fri, 28 Oct 2011 07:49:21 -0700 (PDT)
| Newsgroups | gmane.comp.windows.dotnet.nant.devel |
|---|---|
| Message-ID | <[email protected]> |
----- Original Message ----- From: Stefan Bodewig <[email protected]> To: [email protected] Cc: = Sent: Friday, October 28, 2011 2:17 AM Subject: Re: [nant-dev] Next NAnt/NAntContrib TODO Tasks On 2011-10-26, Ryan Boggs wrote: > On Wed, Oct 26, 2011 at 8:53 AM, Stefan Bodewig > <[email protected]> wrote: >> When I worked on the log4net release I cursed NAnt's lack of a <mapper> >> so a big +1 for this. =A0I also miss <macrodef>. =A0Badly. > I should add <macrodef> too, eh? > This may be my Ant bias.=A0 log4net's build file is a big mess of > copy-paste and I think macrodef would help, but maybe there is a > NAnt-idiomatic way of fixing that without macrodef.=A0 It looks as if > "call"ing a target is something you'd do more lightly and more often in > NAnt than in Ant. In Ant if you "call" a target and return, the variables set in that inner t= arget aren't available in the outer scope. =A0Therefore you can't easily cr= eate "call"-able, reusable functions that return stuff, you can only create= helpful things that do things. =A0Thus, in Ant, you create insane dependen= cy chains. =A0The way around this in Ant is <macrodef>. In NAnt if you "call" something and return, all the variables set in the in= ner scope still exist. =A0Therefore I can create helpful "figure out the pa= th" call-able targets or <foreach> around a call target or intermingle in e= ffect function calls with pre- and post-processing code. I find NAnt's paradigm more helpful and easier to understand, though I unde= rstand why Ant chose to scope properties the way it did. =A0In the end, hav= ing an NAnt <macrodef> would be very useful, but it'd be less useful to tho= se who understand the difference between property scopes between the produc= ts and more useful to people trying to copy/paste functionality from Ant. Rob ---------------------------------------------------------------------------= --- The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn = about Cisco certifications, training, and career opportunities. = http://p.sf.net/sfu/cisco-dev2dev