Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 14372 invoked from network); 3 Jun 2004 16:33:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 3 Jun 2004 16:33:08 -0000 Received: (qmail 29380 invoked by uid 500); 3 Jun 2004 16:33:20 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 29175 invoked by uid 500); 3 Jun 2004 16:33:18 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 29150 invoked by uid 99); 3 Jun 2004 16:33:18 -0000 Received: from [212.18.242.163] (HELO leeds.cellectivity.com) (212.18.242.163) by apache.org (qpsmtpd/0.27.1) with ESMTP; Thu, 03 Jun 2004 09:33:18 -0700 Content-Class: urn:content-classes:message Subject: RE: Possible Ant 1.7 alpha bug: property expansion. MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Thu, 3 Jun 2004 17:32:56 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Possible Ant 1.7 alpha bug: property expansion. Thread-Index: AcRJgVqsXsOGObHJTJ6UHutecEOHwwABMSjQ From: "Jose Alberto Fernandez" To: "Ant Developers List" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N > From: Jack J. Woehr [mailto:jax@purematrix.com]=20 >=20 > Matt Benson wrote: >=20 > > 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. >=20 > Well, some of what you are talking about is a little deeper=20 > in Ant-fu than I care to go for this particular exercise ...=20 > I'll just change the PropertyHelper class to make this work=20 > and do it neatly so it's easy to extract the little bit of=20 > code needed to make this work (one new short source file and=20 > a new function in PropertyHelper) and then maybe if it's=20 > likeable enough someone will move the code into the proper=20 > 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 Presto.... 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 java.text.Format 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 property 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: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org