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 javac, depend, and interface constants
Date Mon, 23 Jul 2001 15:04:55 GMT
All, I know this is question is more general than just ant, but it stems
from the use of the javac and depend tasks.

I'm trying to add usage of the depend task to our current build system.
I need it for the obvious reasons of not wanting to do a full clean and
build in order to catch dependencies during recompile. 

Since the javac task only hands the list of filenames that have modified
to the underlying compiler, the compiler can't do proper dependency
analysis. Thus I'm working on the depend task.

Enough background, here's the problem.

I have an interface that defines constants (public static final).
I have another class that uses those constants.

If I change one of the constants in the interface the depend task does
not remove the class file for the dependent class.

After some digging, it appears that the compiler is removing the actual
class member references and just embedding the constant directly into
the generated class file.  This happens even with debug turned on and
optimization turned off.  Even declaring them as non-final seems to have
no effect.

Does anyone have ideas on how to fix, prevent, work around this?

-- 
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