ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <>
Subject RE: Possible Ant 1.7 alpha bug: property expansion.
Date Thu, 03 Jun 2004 16:32:56 GMT
> From: Jack J. Woehr [] 
> Matt Benson wrote:
> > We could create a new property
> > ant.PropertyHelper.classname or some such, to allow
> > users a comfortable way to avoid the situation above,
> > but AFAICT the issue still exists.
> Well, some of what you are talking about is a little deeper 
> in Ant-fu than I care to go for this particular exercise ... 
> I'll just change the PropertyHelper class to make this work 
> and do it neatly so it's easy to extract the little bit of 
> code needed to make this work (one new short source file and 
> a new function in PropertyHelper) and then maybe if it's 
> likeable enough someone will move the code into the proper 
> hook relationship with tao of Ant ....

Well, it seem to me the problem is deeper. Without looking at the code
and directly from old memory banks. I seem to remember that
the way property substitution works is something like this:

1) get the text that needs substitutions
2) Chop the text into segments (each end of segment is a place where
substitution is needed.
3) After chopping you get two vectors, one of texts and one of
properties to replace
4) Call property helper on each one of the properties
5) Reassemble all toghether


So what needs to be change is the chopping part, but this is dependant
on the syntax for the PropertyHelper and not something fix.
The case of recursive properties is just an example.

I guess, the way to do it properly is to use something like the way
works. You find the beginning of a property reference and the
PropertyHelper chain is the one that tells you where is the end pf the
and the beginning of the rest of the code.

Such strategy would allow writing property evaluators that contain real
complex expressions inside. Which we have discussed in the past.

Anything else, I think it will be just like a hack that will break
something else.
(Well as long as my recollection of how the thing works is still
correct) ;-)

Jose Alberto

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message