hg: penrose/penrose: 1. Update Penrose demos to support JSON format module info.
David Bosschaert
david.bosschaert at gmail.com
Wed Jul 4 07:42:29 PDT 2012
Hi Shi Jun,
On 4 July 2012 12:04, David Bosschaert <david.bosschaert at gmail.com> wrote:
> On 4 July 2012 07:36, Shi Jun Zhang <zhangshj at linux.vnet.ibm.com> wrote:
>> 2. Error message is not clear enough. I typed "jdk.desktip" by mistake in
>> requires section in modulebrowser, and then I got an error said
>> "modulebrowser cannot be solved" when installing the module into module
>> library. It should tell "jdk.desktip cannot be solved" instead.
>
> Thanks - I'll look into that.
Actually this is more of an issue for the Jigsaw resolver. It should
report better why a module cannot be resolved, so let's say
com.greetings.json has a dependency that isn't found, it simply
reports this:
org.openjdk.jigsaw.ConfigurationException: com.greetings.json@=0.1:
Cannot resolve
at org.openjdk.jigsaw.Resolver.fail(Resolver.java:91)
at org.openjdk.jigsaw.Resolver.run(Resolver.java:460)
at org.openjdk.jigsaw.Configurator.configure(Configurator.java:144)
at org.openjdk.jigsaw.Configurator.configure(Configurator.java:204)
at org.openjdk.jigsaw.SimpleLibrary.configureWhileModuleDirectoryLocked(SimpleLibrary.java:1720)
at org.openjdk.jigsaw.SimpleLibrary.installFromManifests(SimpleLibrary.java:1154)
at org.openjdk.jigsaw.cli.Librarian$Install.go(Librarian.java:207)
If the resolver would give a better error message that would resolve
your issue. 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...
Best regards,
David
More information about the penrose-dev
mailing list