ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <jalbe...@cellectivity.com>
Subject RE: new Task subclass
Date Wed, 21 Jul 2004 15:32:22 GMT
> From: Mike Jennings [mailto:mike@southgatesoftware.com] 
> 
> 
> Thanks again for the feedback! Both <target> and <fail> have 
> if="" and unless="" attributes. Is there any chance that 
> these attributes will be changed or removed? Is there a 
> consensus about if/unless handling in these components?
> 
> Perhaps there is more to the if/unless issue than I 
> originally thought, but I think that if="" and unless="" 
> attributes are an excellent, terse way of conditionally 
> executing something while keeping the XML human-readable.
> 

Ok here is the argument about being not such a good idea (in general).
1) For every contition you need to test in the whole of your buildfile
you need to come up with yet another property that will be use for
testing it.

2) Then you need to make sure that all your properties have been tested,

and those that are not defined because of the test, will never be
defined later
by some other part of your build.

In escence, it is noce for small things, but for large builds it becomes
a real nightmare.

What other competing stuff is out there:

a) Use <if> from antcontrib (more to the point: convice enough comitters
to 
get <if> and such inside core, since some people do not like importing
3rd parties
for such basic functionality. The people against claim is too verbose.

b) Some have proposed the idea of an evaluation language that can be
used
inside the if/unless attributes. That would allow expressing conplex
conditions
without needing to define properties for each one of them. Also means a
language must be defined or adopted and it must have enough expressing
power.

All this things do not exclude one another, but before we embark on some
direction
we need to think about what will be best for readability,
maintenability, etc.

Jose Alberto

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message