ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "" <>
Subject Re: Can Ant do non-simplistic dependancy checking?
Date Mon, 14 Apr 2003 07:30:52 GMT
Thanks for all the replies.
I will check out the <javamake> it seems most likely to solve my problem.
Just for the information of the others, I don't think dependset is the 
right solution to the problem, since
it's simply relying on the file timestamp. Sometimes you need to 
calculate dependancies based on the references within a source file,
this imples some syntactic analysis of the source files, which Ant 
doesn't handle by default.

For example, imagine a circular dependancy: contains a static reference to .
I compile them using Ant, they both get passed to the compiler and 
everything is fine.
But then I change the static variable in which is referenced by, and only will be recompiled, even though the code
in A.class is now "stale" and contains an invalid valid (static values 
are compiled into the class file, not referenced at runtime).
Now I agree for this simple situation, it would be easy to implement a 
dependset task so would depend on, but this is not a feasible
approach for any realistically sized project - it's is a task which 
should be easily automated.
Identifying these dependacies, never mind hand-coding them into your 
build files, is almost impossible.


Steve Loughran wrote:

> wrote:
>> Our current project has been going well using standard time-stamp 
>> based dependancy checking, but we have the need to implement
>> some real dependancy checking.
>> For example, checking not only Java<->Class dependancy, but also 
>> recompiling any Java
>> files which depend on a given compiled file.
> look at <depends>, and its caveats
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message