[jsr294-modularity-eg] dependency declaration syntax...

Alex Buckley Alex.Buckley at Sun.COM
Tue May 12 21:16:08 EDT 2009


Paul Benedict wrote:
> Fantastic response. One thing that hasn't been obvious to me is that
> module-info.java is a pure Jigsaw artifact. Although I've been
> following the discussion, somehow I managed to miss that distinction.

Ah, I didn't say that module-info.java is Jigsaw-specific. I said javac 
connected to Jigsaw would look for it. That's because javac always looks 
for module compilation units in module-info.java at a certain location. 
This is a feature of the RI, independent of Jigsaw. We've found it 
simplifies bootstrapping if javac can minimally interpret module 
compilation units and locate "modules" on a modulepath before Jigsaw is 
built.

Later, when javac is connected to Jigsaw, the data in module-info.java 
is passed from javac to Jigsaw for fuller interpretation, e.g. version 
ranges. Another compiler with different constraints could read 
module-info.java from a different location than javac - perhaps from a 
central MODULES directory - and pass it to another module system.

Further discussion of how javac finds module compilation units should 
occur on jigsaw-dev, 
http://mail.openjdk.java.net/mailman/listinfo/jigsaw-dev

> PS: Any chance you could rename module-info.java to
> jigsaw-module.java? It would be clearer if it didn't have such a
> general name.

Nope, because module-info.java in a certain location is a feature of the 
RI, not of Jigsaw. Plus, the 'system' feature of a module compilation 
unit makes renaming module-info.java pointless, since the file might not 
contain data for Jigsaw.

Alex


More information about the jsr294-modularity-observer mailing list