ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject Re: Smarter Javac
Date Tue, 20 Nov 2001 01:15:09 GMT
On Tue, 20 Nov 2001 11:52, Rob Oxspring wrote:
> > I think you missed my point ;)  You have to cache information per-file
> > because for some reason you may always compile file X with
> > debugging, while Y
> > with no debugging. This does not mean you can't aggregate the
> > files during
> > compiler execution
> >
> > javac -g
> >
> > etc
> How would you go about this in Ant? Surely in current ant this would have
> to be split into two invocations of the javac task? 


> In which case, the colour need only be cached on a per task basis.

If every task operated on the same set of data everytime then that would 
work. The problem is that the source files for each task may change each run.

> The issue of cache size /
> read speed should be mute here, since a single aggregated cache file would
> have a size roughly proportional to the build file.

I think you are trying to treat it in the same fashion as the c world treats 
autoconf values ? Essentually you would have a "config.cache" file that lists 
all these values yer?

Iwas thiking about integrating it more into runtime like .deps files are 
handled in c world. 


> In short: The same colour applies to all files processed by a given task
> invocation, therefore the colour is defined purely by the attributes (+
> inner elements) of the task.

It is up to the task to determine which parameters are relvent - this may or 
may not be related to attributes/elements of task.

> An ant file build.xml:
> <project name="xyz" basedir=".">
> 	<target name="init"><property file="defaults.props"/></target>
> 	<target name="compile" depends="init">
> 		<javac debug="${debugmode}" src="..."/>
> 		<javac debug="${debugmode}" src="...">
> 			<fileset .../>
> 			<fileset .../>
> 		</javac>
> 	</target>
> </project>
> Would just have a file build.color:
> <project color="MD5-012335765342">
> 	<target name="init" color="MD5-012335765342">
> 		<property color="MD5-012335765342"></target>
> 	<target name="compile" color="MD5-1231345345">
> 		<javac color="12341234"/>
> 		<jaavc color="57473982"/>
> 	</target>
> </project>
> This way you could also regard the configuration colour to have changed
> even when the only thing to have changed is the depends attribute of the
> containing target.  (Can't quite think whether this is useful or not though
> - its late)

interesting. Something to think about.

> If the colour is calculated at the getting and setting stage (i.e. only the
> attributes explicitly set in the XML file) then the colouring would be
> immediately available to all tasks.  The tasks themselves could be changed
> to take advantage of this new information as necessary.
> Please shout me down if I'm being daft and missing points here.

actually your proposing a different interpretation (ie autoconf style) than 
what I had been thinking.



"Therefore it can be said that victorious warriors 
win first, and then go to battle, while defeated 
warriors go to battle first, and then seek to win." 
              - Sun Tzu, the Art Of War

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

View raw message