XML for module descriptor

David Bosschaert david.bosschaert at gmail.com
Thu Apr 19 05:09:00 PDT 2012


For those who are interested, I've just posted a RFR with an initial
JSON-based implementation on penrose-dev:
http://mail.openjdk.java.net/pipermail/penrose-dev/2012-April/000049.html

Best regards,

David

On 17 April 2012 08:09, David Bosschaert <david.bosschaert at gmail.com> wrote:
> Seems like there is at least a majority for going with JSON as a
> format. I'm not an expert in encodings but to me it looks like it
> could be solved in the same way as currently done for the MANIFEST.MF.
> I'll start prototyping the JSON module descriptor in Penrose.
>
> Best regards,
>
> David
>
> On 14 April 2012 09:08, Jeff MAURY <jeffmaury at jeffmaury.com> wrote:
>> Even if the module file is using a specific encoding, the
>> compilation/packaging of the jmod file can convert the file to the expected
>> encoding just like what is done for .java --> .class files and probably
>> what is done for MANIFEST.MF as well.
>>
>> Jeff
>>
>> On Sat, Apr 14, 2012 at 3:49 AM, Debasish Ray Chawdhuri <
>> debasish.raychawdhuri at gmail.com> wrote:
>>
>>> 1. How do your java files specify encoding? Similarly we might try to
>>> externally specify encoding in case it is not our default UTF-8 with some
>>> form of -encoding option.
>>>
>>> 2. JSON can specify encoding if we modify the parser a little. I guess we
>>> would have to find something with a license compatible with GPL. We can
>>> modify it to read an optional first line { "encoding":"UTF-8",  if default
>>> encoding is not used. But I still would prefer the external option being
>>> passed to java compiler and java runtime.
>>>
>>> 3. The reason people do not complain about MANIFEST.MF being always in
>>> UTF-8 is that people hardly ever try to have class names and package names
>>> in non-ASCII characters, the encoding support for java files in mainly for
>>> string literals.
>>>
>>> It certainly does not make sense to have a complex parser like XML parser
>>> just because we want to support different encoding and we want the class
>>> names, package names and module names in non-ASCII characters.
>>>
>>> --
>>> Debasish Ray Chawdhuri
>>> <http://www.geekyarticles.com/>
>>>
>>
>>
>>
>> --
>> Jeff MAURY
>>
>>
>> "Legacy code" often differs from its suggested alternative by actually
>> working and scaling.
>>  - Bjarne Stroustrup
>>
>> http://www.jeffmaury.com
>> http://riadiscuss.jeffmaury.com
>> http://www.twitter.com/jeffmaury



More information about the jigsaw-dev mailing list