-encoding and -source in module-info.java
peter.jensen at oracle.com
Wed Jan 25 15:36:10 PST 2012
On 01/25/12 12:47, Jesse Glick wrote:
> On 01/25/2012 02:16 PM, Alex Buckley wrote:
>> All those things are implementation details and so don't belong in a
>> module declaration as defined by the JLS.
> Then the encoding needs to be specified somehow in the source root
> outside of a module declaration (such as my proposed $root/encoding
> file). I do not really care whether the JLS ever mentions it or not,
> so long as javac interprets disk files with a predictable encoding -
> so that all Java language tools which operate on files (*) will be
> able to parse a given module source tree the same way. Currently they
> need out of band information to do so, and that is a significant problem.
A Java compiler may support different encodings, it may support
compilation of source code written against different version of the JLS,
it may support generation of Java byte code relying on APIs as defined
by different versions of the JLS, ...
Specifying such options, in whatever format, means specifying common
capabilities where it has previously been open to the implementation.
While there might be sense in doing so, I fail to recognize why modules
make this any more, or less, of an issue. Did I miss an argument why
this is especially critical for modules? Or is it more a matter of
filling an existing void?
More information about the jigsaw-dev