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

Paul Benedict pbenedict at apache.org
Wed May 13 00:08:51 EDT 2009


If module-info.java is not Jigsaw specific, then I agree with whoever
said we should just "admit" that the "chicken and the egg" problem is
solved by its own domain language. Trying to shove the answer into a
Java class file seems like an exercise of bending iron bars into horse
shoes.

-- Paul

On Tue, May 12, 2009 at 8:16 PM, Alex Buckley <Alex.Buckley at sun.com> wrote:
> 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