ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conor MacNeill <co...@cortexebusiness.com.au>
Subject Re: auto dependency generation?
Date Thu, 11 Apr 2002 14:21:34 GMT
Daniel Barclay wrote:

> 
> Wasn't someone asking about cases that <depend> doesn't cover
> (that is, the few kinds of source dependencies not reflected 
> in class files, or new source dependencies)?
> 


Not the original poster, but one reply mentioned the limitations of <depend>.


> Theoretically at least, might there be a place for a full source 
> dependency checker?  It would do a full dependency check on the 
> current source (instead of looking at class files with: 1) not-quite-
> full and 2) not-quite-current dependency information).  
> 


Well, <depend> is always current. To have created a new dependency for a class, 
you must have changed its source so it will definitely be recompiled. If you can 
provide me with an example where this isn't true, please do.


> It could operate as <depend> does, deleting class files to force
> the <javac> to recompile whatever needed to be recompiled.
> 


I'm not sure if a source level analysis would be significantly faster than 
remove all class files and recompiling. i.e. which of these would be faster

1. delete all class files and recompile all
2. parse all source files, delete out of date class files, recompile missing files

I don't know for sure. My suspicion is that parsing the files may be the 
significant part of what javac does, time wise.

> 
> <pie-in-the-sky probably-level="yeah, right">
> 


Well maybe not in the long run. In current CVS, I have created a 
DependencyAnalyzer interface which I hope can support multiple analyzer 
implementations - a BCEL classfile analyzer and a source based analyzer. I have 
write access to the javad sourceforge project so the strategy would be to add a 
javad based analyzer.

Right now, <depend> doesn't use this interface but that is one of my aims which 
would also allow transitioning to a BCEL based <depend>. I'm not sure about the 
1.5 timeframe.


> Actually, wouldn't it be ideal if compilers wrote out dependency
> information during regular compilation?
> 

Yes, this would be great and could easily be accomodated in the current 
classfile structure as a new attribute type. Until then ...

Conor


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message