module-info.java just causes problems
forax at univ-mlv.fr
forax at univ-mlv.fr
Wed May 11 18:53:13 UTC 2016
----- Mail original -----
> De: "Alan Bateman" <Alan.Bateman at oracle.com>
> À: "Rémi Forax" <forax at univ-mlv.fr>, jigsaw-dev at openjdk.java.net
> Envoyé: Mercredi 11 Mai 2016 18:56:19
> Objet: Re: module-info.java just causes problems
> On 11/05/2016 16:37, Rémi Forax wrote:
> > :
>
> > Note that i will update ASM soon to be able to read/write a module-info, so
> > at least there will be a way to update a module-info.class without elying
> > on
> > javac.
>
> Good to hear. As you probably know, we have asm.Attribute implementation of
> the Module and other attributes and these are already used by the `jar` and
> `jmod` tools when they read or add attributes to module-info.class. All very
> straight-forward.
yes,
you means the attributes defined in jdk.internal.module.ClassFileAttributes.
I want to add a visitor API (to allow incremental changes) and re-work the Remapper, the tool that help to rename a class or a package, because the module-info also need to be updated (exports, uses/provides, conceal attribute, etc).
I also want to gather experience on the bytecode representation,
BTW, the current format has a bug, encoding the name of a module as a part of the class name fell like a hack. It is a bad idea because the JVM Spec doesn't allow some characters in a class name, i think it should be encoded as a Utf8 (at the starts of the Module attribute),
it's also weird because the name of the module-info.class is not "module-info" unlike any other classes, this will require to change more code than necessary in a lot of bytecode tools i know.
> -Alan.
Rémi
More information about the jigsaw-dev
mailing list