JPMS support

31 views
Skip to first unread message

vkos...@gmail.com

unread,
Sep 16, 2021, 4:58:04 PM9/16/21
to Gremlin-users
Hi,
Are there any plans for JPMS support?
Even simple addition of Automatic-Module-Name would help a lot in integration of Tinkerpop as embedded graph engine, and would not require much effort from developers.
Thanks, 
Vlad

Stephen Mallette

unread,
Sep 17, 2021, 12:11:08 PM9/17/21
to gremli...@googlegroups.com
I don't know enough about JPMS to comment much tbh. We havent really taken advantage of any Java features past Java 8 despite 3.5.x being on Java 11. We also technically dual build 3.5.x on Java 8 and 11 targeting Java 8 bytecode:


I imagine taking advantage of JPMS will force us to drop all aspects of Java 8? Perhaps you could briefly explain the "simple addition" you propose a bit further to explain the change and the benefit? If you have links to resources that provide that explanation, that would work too.

--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/740ef6c9-b33e-4c12-83ee-a2b93c01dc3cn%40googlegroups.com.

vkos...@gmail.com

unread,
Sep 18, 2021, 12:48:41 PM9/18/21
to Gremlin-users
You can still stick to Java 8 codewise, it still works fine with apps that use Java 9 and up.

There is only one issue here. If the application. like mine, uses JPMS, it may suffer form errors similar to "The package java.util is accessible from more than one module: <unnamed>, java.base".
These error messages are caused by the fact that jars you currently provide are treated as unnamed modules, and when mixed with other unnamed modules from classpath can easily break the module inheritance hierarchy.
While these errors can be fixed by <exclude> in application POM, they are hard to localize the causing library.

All you need to avoid such issues is include the following line:
Automatic-Module-Name: org.apache.tinkerpop.<your-unique-chosen-module-name-for-this-jar>
to each jar's  META-INF/MANIFEST.MF

This would be an easy first step to begin modularization of TinkerPop while sticking to Java 8.


Stephen Mallette

unread,
Sep 20, 2021, 8:27:49 AM9/20/21
to gremli...@googlegroups.com
If it's just a manifest entry to make that error message nicer, i'm personally fine with that. Would you mind submitting a pull request for that (to the master branch i suppose)? if you don't have time, perhaps you could create an issue in JIRA so we don't lose track of it.

vkos...@gmail.com

unread,
Sep 20, 2021, 3:09:48 PM9/20/21
to Gremlin-users
Reply all
Reply to author
Forward
0 new messages