Incremental modules build

Alan Bateman Alan.Bateman at ORACLE.COM
Fri Oct 22 09:18:18 PDT 2010


Mandy Chung wrote:
>  Hi Alan,
>
> I made the time to clean up the class analyzer tool to be more generic 
> (as its initial versions used to be) and add the incremental modules 
> build support.  This is very close to the version that you reviewed 
> some time ago [1].
>
> Webrev at:
>    http://cr.openjdk.java.net/~mchung/jigsaw/incremental-build/
>
> The modules build includes three main steps:
> a. run the class analyzer tool to assign classes and resources in the 
> jdk modules and analyzes their dependencies
> b. compile the module-info.java source files generated by the class 
> analyzer
> c. modularize the jdk build
>     - copy classes, resources and other non-java files for each module 
> to $OUTPUTDIR/modules/<m> directory where <m> is the module name
>     - create the jigsaw module library and install the jdk modules in it.
>
> To support the incremental build, the tools and makefile will need to 
> detect what files and modules are modified.  To simplify the change, 
> one single marker file is added and updated when any part of the jdk 
> is remade.  The modules build will use the timestamp of the marker 
> file to determine if it should do an incremental or do a full modules 
> build.
>
> I created a new tool com.sun.classanalyzer.Modularizer to do the 
> timestamp comparison and the files copying.   Both ClassAnalyzer and 
> Modularizer will process classes/resources files that are updated 
> since the last build.
>
> Thanks
> Mandy
>
> [1] 
> http://mail.openjdk.java.net/pipermail/core-libs-dev/2010-July/004543.html 
>
>
This looks much better and lots of clean-ups since the the last time I 
looked at these changes. There is a lot of code in this webrev so hard 
to review every line. I went through the make file changes, and the 
class analyzer changes and don't see any obvious issues.

One minor thing is you've renamed ClassPath to ClassPaths but I think 
the original name works better (maybe rename the new ClassPath to 
ClassPathEntry, and fix up the sub-classes?).

Another minor comment is that the parameter to Modularizer to specify 
the directory with the class list might be better specified as 
-classlistdir as the current parameter suggests it's a class list.

-Alan.



More information about the jigsaw-dev mailing list