Don't compile if class file is younger than source

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Don't compile if class file is younger than source

Mike Cowlishaw-3
I'll take a look at this.  NetRexxC already skips the javac step in this
case, but I think it needs to process all the source files if they
are interdependent, to get the required information and make sure the
source file are consistent.  The interdependencies, or other changes,
could change the meaning of the source file, perhaps, hence giving
rise to a different .class file?

Example:

  1. You have a source file, fred.nrx, which imports two packages:

       import foo.bar
       import a.n.other

     and (within the class) refers to a class in foo.bar

       var=AClass()

  2. You compile this, and now have a .class file, newer than the
     source.

  3. Later, you reorganize the two packages, and move AClass to
     a.n.other

  4. This doesn't require a change to fred.nrx, but it clearly needs
     to be recompiled.

  5. You recompile it .. but the .class file is newer than the source,
     so no new .java or .class file is produced.....

--
Mike Cowlishaw
IBM Fellow, IBM UK Laboratories
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to
[hidden email]
with the following message in the body of the note
unsubscribe ibm-netrexx <e-mail address>