ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conor MacNeill <>
Subject Deferred datatype evaluation
Date Wed, 09 Apr 2003 12:20:29 GMT
I've been thinking as a result of this bug

I have made a change to the Configuration of UnknownElements so that non-tasks 
types are not configured until their first use. This allows Ant to work 
irrespective of the order in which data types are defined.

For example, given this simple build file (note "testloc" is used before 

<project name="deferred" default="default">
  <path id="test">
    <pathelement location="${testloc}"/>

  <property name="testloc" location="testdir"/>
  <property name="result" refid="test"/>

  <target name="default">
    <echo message="Result is ${result}"/>


Ant 1.5.3 will give 
Result is /home/conor/development/apache/ant-bugs/scratch/${testloc}

whilst with this patch, Ant 1.6 will give
Result is /home/conor/development/apache/ant-bugs/scratch/testdir

which is kind of cool. Far less procedural.

I'm attaching a patch to show the changes but I want to get some feedback if 
this is desirable before committing.

Currently two tests fail (taskname case sensitivity and classfiletest). I 
haven't looked into these failures yet - it may be a problem or something 
I've broken. I don't want to bother until there is consensus that this is 



Conor MacNeill
View raw message