ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Bucanek <subscri...@gloaming.com>
Subject Re: A few suggestions
Date Thu, 07 Jun 2001 04:47:08 GMT
At 12:07 PM +1000 6/7/01, Peter Donald wrote:
>At 03:50 PM 6/6/01 -0700, James Bucanek wrote:
>>(1) Conditionals.  ant needs a vastly more flexible conditional
>>structure than just if=/unless= a property is/not defined.
>
>Condition will most likely test for presence and if present whether it
>evaluates to false or not. The evaluation of complex (less than, not etc)
>will probably relegated to another task.

If conditions would test by value (true/false), then I think we'd be 
90% there.  It would not be as nice as having expression evaluation 
everywhere.  But if a task could evaluate an expression and then set 
a property with the result, ant would at least have the functionality 
I mentioned, if not the brevity.

>
>>(2) Filters.  <fileset>/<patterset> needs some kind of simple,
>>extendable, filtering mechanism.  Why can't they take, as a
>>attribute, an argument that resolves to a java.io.FilenameFilter
>>object (or an ant equivalent)?
>
>Yep - we will be doing this ... somehow. The *how* part has yet to be
>determined though.
>
>>On occasion, I've been writing my own mappers to preform filtering as
>>a side effect, but it's pretty ugly.  Especially since you can't
>>extend the mapper tag to include any additional information that a
>>filter might need to do it's job.
>
>right - I wanted to extend mappers to do this sort of thing but it was
>-1'ed ;)

Well I suppose it depends on how you did it, but I'd probably would 
have -1'd it too.  :(

I think filters (aka "cullers") perform a separate function from 
mappers.  For one, you'd have the flexibility of being able to 
specify cullers and mappers in arbitrary combinations.  And, cullers 
would could apply to single (source file list) task contexts whereas 
mappers logically imply a target file for each source file.
__________________________________
James Bucanek
<mailto:privatereply@gloaming.com>


Mime
View raw message