ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "webhiker@tiscali.fr" <webhi...@tiscali.fr>
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:
A.java contains a static reference to B.java .
I compile them using Ant, they both get passed to the compiler and 
everything is fine.
But then I change the static variable in B.java which is referenced by 
A.java, and only B.java 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 A.java would depend on B.java, 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.


Cheers.
WH


Steve Loughran wrote:

> webhiker@tiscali.fr 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: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>



Mime
View raw message