hg: penrose/penrose: 1. Update Penrose demos to support JSON format module info.
Paul Sandoz
paul.sandoz at oracle.com
Thu Jul 5 23:44:28 PDT 2012
On Jul 6, 2012, at 4:22 AM, Shi Jun Zhang wrote:
> On 7/5/2012 5:45 PM, Paul Sandoz wrote:
>> On Jul 5, 2012, at 11:25 AM, Shi Jun Zhang wrote:
>>>>> 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.
>>>
>> Ah! that explains it, and i now understand your comment "We didn't do any changes in javac" :-)
>>
>> So you are essentially compiling the module in "classpath" mode because javac does not recognize the source as being module source.
>>
>> Paul.
>
> So the next step maybe is to do some check for JSON format module info at compile time.
>
Yes, instead of checking for module-info.java and creating a ModuleInfo from that you would need to check for the JSON equivalent and create a ModuleInfo from that, thus informing javac to switch to modular compilation mode.
Paul.
More information about the penrose-dev
mailing list