Build-infra with jigsaw, progress update

Erik Joelsson erik.joelsson at oracle.com
Mon Jun 25 01:36:17 PDT 2012


I will try to clear this up.

On 2012-06-22 16:53, Jonathan Gibbons wrote:
> On 06/22/2012 06:24 AM, Alan Bateman wrote:
>> I've just pushed a patch for Michael that puts the module-info.java 
>> source files in the expected location, newsrc/share/mclasses/<module>.
>>
>> Jon - did you go through the sequence in Erik's mail, I can't quite 
>> tell if the compilation of the base module at step 3 is with hybrid 
>> javac.
>>
>> -Alan
>>
> I'm not sure what you mean by "legacy mode" in this context.
>
> javac has different rules for 0 or 1 module, and many modules.   If 
> you are trying to compile many modules together, you have to set up 
> the options appropriately.
>
In step 3, I'm compiling the classes in jdk.base using the hybrid javac 
running on the bootjdk. I used "legacy mode" to mean compiling using 
hybrid javac without modules. The command line used looks something like 
this:

bootjdk/bin/java  
"-Xbootclasspath/p:$(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar" 
-jar $(LANGTOOLS_OUTPUTDIR)/dist/bootstrap/lib/javac.jar -implicit:none 
-sourcepath 
"<jdkroot>/newsrc/share/mclasses/jdk.base:<gensrcdir>/jdk.base:<platformsrcdir>/jdk.base" 
-d <outputdir> @<file-with-all-java-files-listed>

The above line works if there is no module-info.java in the sourcepath. 
If there is a module-info.java (and it doesn't matter if it's listed in 
the java-file list or not), then a bunch of errors like this are given:

/localhome/mercurial/jigsaw-build-infra/jdk/newsrc/share/mclasses/jdk.base/module-info.java:2: 
error: no version available for module jdk.desktop.internal at 8-ea
     requires optional local jdk.desktop.internal at 8-ea;

Is there a way I can force javac to ignore modules and module-info.java? 
If there isn't, I will have to copy all java-files in jdk.base to a temp 
directory in order to manage step 3 in the bootstrap sequence.

Another question on javac and modules. I have successfully compiled all 
modules together in one compile in step 5. I'm not succeeding in 
compiling just a subset of them however. What I would like to be able to 
do is compiling the bare minimum set of modules in the jdk repo and then 
jump over to jaxp, jaxws, corba and langtools and compile them properly 
in a modular way. Are there known issues concerning this at this point?
> The sequence looks mostly fine, to the level of detail that is given. 
> I agree that once you're past langtools, the build should use hybrid 
> javac.
Yes, I can't see it working any other way.
>
> I was surprised to see "langtools" and "stripprop" mentioned in close 
> proximity. langtools uses compileproperties, not strip properties. 
> But  that is not a Jigsaw issue, it is either a typo, or an artifact 
> of new build that needs to be fixed.
>
This was a typo, I meant compileproperties.

/Erik




More information about the jigsaw-dev mailing list