From mandy.chung at oracle.com Wed Oct 20 10:37:56 2010 From: mandy.chung at oracle.com (Mandy Chung) Date: Wed, 20 Oct 2010 10:37:56 -0700 Subject: Incremental modules build Message-ID: <4CBF28F4.2070101@oracle.com> 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/ directory where 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 From Alan.Bateman at ORACLE.COM Fri Oct 22 09:18:18 2010 From: Alan.Bateman at ORACLE.COM (Alan Bateman) Date: Fri, 22 Oct 2010 17:18:18 +0100 Subject: Incremental modules build In-Reply-To: <4CBF28F4.2070101@oracle.com> References: <4CBF28F4.2070101@oracle.com> Message-ID: <4CC1B94A.8020903@oracle.com> 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/ directory where 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. From mandy.chung at oracle.com Fri Oct 22 09:21:24 2010 From: mandy.chung at oracle.com (Mandy Chung) Date: Fri, 22 Oct 2010 09:21:24 -0700 Subject: Incremental modules build In-Reply-To: <4CC1B94A.8020903@oracle.com> References: <4CBF28F4.2070101@oracle.com> <4CC1B94A.8020903@oracle.com> Message-ID: <4CC1BA04.8070200@oracle.com> On 10/22/10 9:18 AM, Alan Bateman wrote: > 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/ directory where 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. > Thanks for reviewing it. > 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. > The above suggested names sound better. I'll fix them. Mandy From mandy.chung at oracle.com Mon Oct 25 09:12:58 2010 From: mandy.chung at oracle.com (mandy.chung at oracle.com) Date: Mon, 25 Oct 2010 16:12:58 +0000 Subject: hg: jigsaw/jigsaw/jdk: Incremental modules build support and update class analyzer tool Message-ID: <20101025161335.8E0B447407@hg.openjdk.java.net> Changeset: 459b6cbb0de7 Author: mchung Date: 2010-10-25 09:11 -0700 URL: http://hg.openjdk.java.net/jigsaw/jigsaw/jdk/rev/459b6cbb0de7 Incremental modules build support and update class analyzer tool Reviewed-by: alanb + make/common/BuildNativePackages.gmk - make/common/BuildPackages.gmk ! make/common/Defs-modules.gmk ! make/common/Defs.gmk ! make/common/Library.gmk ! make/common/Modules.gmk ! make/common/Rules.gmk ! make/modules/Makefile ! make/modules/modules.properties ! make/tools/classanalyzer/build.xml ! make/tools/classanalyzer/nbproject/project.properties ! make/tools/classanalyzer/src/com/sun/classanalyzer/AnnotatedDependency.java ! make/tools/classanalyzer/src/com/sun/classanalyzer/AnnotationParser.java ! make/tools/classanalyzer/src/com/sun/classanalyzer/BootAnalyzer.java ! make/tools/classanalyzer/src/com/sun/classanalyzer/ClassAnalyzer.java + make/tools/classanalyzer/src/com/sun/classanalyzer/ClassListReader.java + make/tools/classanalyzer/src/com/sun/classanalyzer/ClassListWriter.java ! make/tools/classanalyzer/src/com/sun/classanalyzer/ClassPath.java ! make/tools/classanalyzer/src/com/sun/classanalyzer/ConstantPoolAnalyzer.java + make/tools/classanalyzer/src/com/sun/classanalyzer/Files.java ! make/tools/classanalyzer/src/com/sun/classanalyzer/Klass.java + make/tools/classanalyzer/src/com/sun/classanalyzer/Modularizer.java ! make/tools/classanalyzer/src/com/sun/classanalyzer/Module.java + make/tools/classanalyzer/src/com/sun/classanalyzer/ModuleBuilder.java ! make/tools/classanalyzer/src/com/sun/classanalyzer/ModuleConfig.java + make/tools/classanalyzer/src/com/sun/classanalyzer/ModuleInfo.java ! make/tools/classanalyzer/src/com/sun/classanalyzer/PlatformModuleBuilder.java < make/tools/classanalyzer/src/com/sun/classanalyzer/Platform.java ! make/tools/classanalyzer/src/com/sun/classanalyzer/ResourceFile.java ! make/tools/classanalyzer/src/com/sun/classanalyzer/ShowDeps.java + make/tools/classanalyzer/src/com/sun/classanalyzer/ShowRefs.java ! make/tools/classanalyzer/src/com/sun/classanalyzer/Trace.java