JDK-4094636 : eou: javac -depend sometimes recompiles unnecessarily
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 1.1,1.1.5
  • Priority: P5
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic,solaris_2.6
  • CPU: generic,x86
  • Submitted: 1997-11-21
  • Updated: 1998-01-06
  • Resolved: 1998-01-06
Related Reports
Relates :  
Description

Name: joT67522			Date: 11/21/97


javac -depend sometimes recompiles an imported
class even though .class file is newer than
.java file.

What does the word "normally" mean in the
documentation for javac, i.e. in

-depend 
              This option makes the compiler consider recompiling class files which are referenced
              from other class files. Normally, it only recompiles missing or out-of-date class files
              that are referred to from source code. 

Taken from:
jdk1.1/docs/tooldocs/solaris/javac.html


What we'd like to know is: in what circumstances does -depend
recompile a class file? We had assumed that it would only recompile
if the .class file was older than the corresponding .java file, but
this is not the case. The existing documentation on -depend is
unclear and inadequate.

John Williams.
(Review ID: 19795)
======================================================================

Comments
WORK AROUND Name: joT67522 Date: 11/21/97 ======================================================================
11-06-2004

EVALUATION Dave has been dealing with compiler flag stuff. todd.turnidge@Eng 1997-11-21 In 1.2, the documentation for javac has been clarified on this point: Causes recompilation of class files on which the source files given as command line arguments recursively depend. Without this option, only files that are directly depended on and missing or out-of-date will be recompiled. Recompilation does not extend to missing or out-of-date files only depended on by already up-to-date class files. It is unclear if the submitter meant "imported" in the sense of the import keyword or in the general sense of dependence. We would be interested in seeing any example that contradicts the text above. I'm marking this imcomplete; perhaps the submitter will be able to submit a reproducible example. david.stoutamire@Eng 1997-12-04 ==================================================================== joon.oh@Eng 1997-12-15 I emailed the user for more information.
04-12-1997