Re:Jigsaw Finally Arrives in JDK 9
by merb on Friday March 11, 2016 @04:54PM
(#11269826)
actually you still could run two json-lib modules, you create module1 which depends on json-lib1 but doesn't reexport it and module2 depends on json-lib2 but doesn't reexport it.
done.
[ Parent
| on HN ]
But then they would be two different modules; not the same module with different version numbers.
In this situation, the difference between those two descriptions seems more spiritual than practical.
Not really; a module system that has versions allows you to define dependencies in terms of version ranges, so that if installing a newer version into your app the module can decide in its dependencies if the version is compatible or not. If you are spinning up different names for each module/version then you have to go round updating all your code that depends on the module to use the different name, and you can't select a different one. The point was that Jigsaw doesn't have a concept of version numbers in its module dependency system; they are all dependent upon exact name only.
Re:Jigsaw Finally Arrives in JDK 9
by mike_hearn on Saturday March 12, 2016 @08:35AM
(#11272787)
No, that won't work.
Modules are not allowed to export the same packages.