ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Weintraub <>
Subject Re: incremental compilation
Date Mon, 23 Mar 2009 20:11:12 GMT
When I was a C developer, we had similar dependency issues with C and
Make. Changing a static constant in one source file didn't cause all
objects to recompile .And, if we didn't put it in our Makefiles,
changing a *.h file didn't necessarily recompile the source code that
depended upon it. We just had to know these things. It's why they paid
us the big money. Well, not the big money, but we did get stock

Java's dependency tree rebuilding (which is really part of Java and
not Ant) is no worse than what we previously had in other programming
languages. It works about 99% of the time, and you simply had to know
when it might not work and redo a clean build.

To get TRUE dependency checking, you'll have to get something like
ClearCase and use dynamic views. ClearCase tracks all dependencies for
all built objects. Of course it is slow and expensive which is why not
too many other version control systems do it.

On Sat, Mar 21, 2009 at 9:52 AM, Sven Köhler <> wrote:
> Hi,
> according to the docs it seems, that ant is (still) not suitable for
> incremental compilation. Is that true?
> Quote from the docs of the depend task:
> ********************************************************************
> The most obvious example of these limitations is that the task can't tell
> which classes to recompile when a constant primitive data type exported by
> other classes is changed. For example, a change in the definition of
> something like
> public final class Constants {
>  public final static boolean DEBUG=false;
> }
> will not be picked up by other classes.
> ********************************************************************
> Yes, the good constant-inlining. So there is really nothing implemented to
> detect that? That is: if I don't do an "ant clean" once in a while, then i
> will have inconsistent class files?
> I'm rather amazed. But the trouble seems to be, that modern javac doesn't
> generate any dependency information in addition to or inside the class
> files. Is that right?
> Regards,
>  Sven
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

David Weintraub

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

View raw message