Multiple versions of a non-exported dependency
cowwoc at bbs.darktech.org
Wed Aug 31 17:56:25 UTC 2016
I recently became aware of the fact that the Jigsaw specification declared
"version-selection" as a non-goal. While I understand how we ended up here,
I am hoping that you were able to support the following (very common)
* Module "HelloWorld" depends on modules "Guava" and "JSoup".
* Module "Guava" depends on module slf4j version 1 (requires but does not
* Module "JSoup" depends on module slf4j version 2 (requires but does not
* slf4j version 2 and is not backwards-compatible with version 1.
What happens at runtime? Will Jigsaw (out of the box, without 3rd-party
tools like Maven or OSGI) be smart enough to provide different versions of
slf4j to "Guava" and "JSoup"?
I hope that you did not drop version numbers altogether when dropping
version-selection. Jigsaw should be able to map fixed version numbers
(string literals) to different JAR files without having to understand the
underlying versioning rules behind each string literal. Maven/OSGI could use
their proprietary version-selection algorithms to select a specific version,
generate a module-info.java containing that fixed version, and pass that to
the JDK at build time. Would that not work?
If "requires" no longer takes a version number, I fear that you will never
be able to add versioning support in the future...
View this message in context: http://jigsaw-dev.1059479.n5.nabble.com/Multiple-versions-of-a-non-exported-dependency-tp5713364.html
Sent from the jigsaw-dev mailing list archive at Nabble.com.
More information about the jigsaw-dev