hg: penrose/penrose: 1. Update Penrose demos to support JSON format module info.

Shi Jun Zhang zhangshj at linux.vnet.ibm.com
Thu Jul 5 02:25:52 PDT 2012


On 7/5/2012 2:54 PM, Paul Sandoz wrote:
> On Jul 5, 2012, at 7:55 AM, Shi Jun Zhang wrote:
>>>
>>>> The resolver is independent from the JSON module metadata,
>>>> because the module metadata is internally represented in the same way,
>>>> regardless of whether it was read from a module-info.json or a
>>>> module-info.class file.
>>>>
>>>> With the module-info.java you get this warning earlier, during the
>>>> javac process as it converts the .java file into a .class file. The
>>>> .json file does not need to be compiled, but it would be good if the
>>>> javac compiler could validate it in the future. BTW the error message
>>>> from javac doesn't tell you why the resolution failed either right
>>>> now...
>>>>
>>> The resolver will also be used by javac, so i would expect an error when compiling such a module.
>>>
>>> Was the JSON module declaration modified after compilation?
>>>
>>> Paul.
>>>
>> The module-info.json will not be compiled. We didn't do any changes in javac.
>>
> Clarification: by compilation, i meant compilation of the module.
>
> When javac compiles a module it will use the resolver, the resolver in turn will use module decoration information. So if you did not get a ConfigurationException when compiling the module but did when you installed the module then either the module decoration was modified after the module compilation or something odd is gong on.
>
> Paul.

javac will search module info in module path and source path and use the 
resolver to resolve it, but javac doesn't recognize module-info.json. 
With setting JIGSAW_TRACE=1000, I can see that javac will only try to 
resolve jdk module if there is no module-info.java in source. This 
causes no error message at compile time with JSON format module info.

-- 
Regards,

Shi Jun Zhang




More information about the penrose-dev mailing list