David M. Lloyd
david.lloyd at redhat.com
Mon Sep 12 16:01:41 UTC 2016
On 09/12/2016 10:11 AM, Mark Reinhold wrote:
> Issue summary
> #VersionsInModuleNames --- Some have argued that library maintainers
> will be tempted to encode major version numbers, or even full version
> numbers, in module names. Is there some way we can guide people away
> from doing that? 
> Make two small changes:
> - Revise the automatic-module naming algorithm implemented by `javac`
> at compile time and the `ModuleFinder::of` method  at run time.
> It will now strip any trailing digits and period characters that
> remain after removing the version component, if any, from the name
> of the original JAR file. Thus `foo-bar-1.2.3.jar` becomes the
> automatic module named `foo.bar` with the version string `1.2.3`,
> and `foo-bar42.jar` becomes the automatic module named `foo.bar`
> with no version string.
> - Revise `javac` to emit a lint warning, enabled by default, when a
> module-declaration compilation unit mentions a module name that
> ends with one or more digit characters, whether it is the name of
> the module being declared or the name of a module referenced in a
> `requires` directive or a qualified `exports` directive.
>  http://openjdk.java.net/projects/jigsaw/spec/issues/#VersionsInModuleNames
>  http://download.java.net/java/jigsaw/docs/api/java/lang/module/ModuleFinder.html#of-java.nio.file.Path...-
Seems OK as long as it remains restricted to automatic module naming.
More information about the jpms-spec-experts