ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry V. Streepy, Jr." <stre...@healthlanguage.com>
Subject Re: javac, depend, and interface constants
Date Mon, 23 Jul 2001 18:03:00 GMT
Jason Pettiss wrote:
> 
> Final constants are hardcoded directly in the classes that use them, for
> performance reasons.  This is in the java spec (since 1.0).  If you make a
> change to the interface/class that defines these constants, but don't
> recompile the classes that use them, you'll run into *big trouble*.

But these are not final's.

> The javac task fortunately has a 'depend="true"' option, which turns on
> dependency analysis in the compiler (so that extra files other than those
> specified can be brought in and recompiled as needed).  This slows things
> down some, but if clean builds are regular practice for you, then you may
> want this option.

The depend option on the javac task is essentially useless.  The javac
task filters the set of files to compile to only those whose source
modification time is newer than the class file.  Thus, the file is going
to be compiled regardless of whether any classes it depends upon are
newer.

The problem lies in determining the reverse dependency: I.e., what
classes depend on the class that is being compiled.  The depend task
attempts to do this by reading the class files, but that leads us back
to the main problem that the compiler is inlining the class member
reference and, therefore, we lose the dependency. :-(

-- 
Larry V. Streepy, Jr.
Chief Technical Officer and VP of Engineering

Health Language, Inc.  -- "We speak the language of healthcare"

970/626-5028 (office)           mailto:streepy@healthlanguage.com
970/626-4425 (fax)              http://www.healthlanguage.com

Mime
View raw message