issues with jdk/make/modules/modularize.sh
Mandy.Chung at Sun.COM
Tue Jan 19 14:38:34 PST 2010
Jonathan Gibbons wrote:
> The current jigsaw forest does not build with the latest javac that I
> would like to put back.
> The build fails like this:
>> make: Entering directory
>> JIGSAW_TRACE=3 sh modularize.sh boot base awt swing tools
>> -- jdk.boot
>> error: module library not found:
>> 1 error
> In modularize.sh I see some lines of the form:
> $BIN/javac -source 7 -d $MCLS -modulepath $SRC $SRC/$m/module-info.java
> This line looks suspect, if only for putting what looks like a source
> directory on the module path. It should probably be:
> $BIN/javac -source 7 -d $MCLS -modulepath $MCLS -sourcepath $SRC
> It's also not the best way to invoke javac -- once per source file,
> using sourcepath, as compared to a single invocation for all relevant
> module-info.java files.
I'm working on merging the modules build makefile changes in TL with the
jigsaw modules build. modularize.sh and imagine.sh will go away.
I have changed the makefile to compile all module-info.java files in one
javac invocation in my repo. As this is new javac functionality, I
didn't run into the problem you described above in my repo.
modularize.sh invokes jmod to install the module library. I wonder if
this issue is related to the invocaton to jmod in creating the module
> Finally, this is the beginning of the iceberg of how to use javac to
> bootstrap the module system into existence.
> The error message from javac (module library not found) indicates that
> javac is trying to do a normal "end user" compilation, involving the
> default system module library. This is new functionality in this
> version of javac.
> The question is, how should we be handling this situation here?
> -- Should we simply create (mkdir) an empty modules directory to keep
> javac happy?
> -- Or, should javac have an option to disable looking for the system
> module library?
> -- Or should javac not be looking for the system module library if it
> can satisfy all references via the command line.
> -- Or should javac be running in a special bootstrap mode that is used
> for internal cases like this?
> -- Jon
More information about the jigsaw-dev