JPMS support

瀏覽次數:31 次
跳到第一則未讀訊息

vkos...@gmail.com

未讀,
2021年9月16日 下午4:58:042021/9/16
收件者: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

未讀,
2021年9月17日 中午12:11:082021/9/17
收件者: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

未讀,
2021年9月18日 中午12:48:412021/9/18
收件者: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

未讀,
2021年9月20日 上午8:27:492021/9/20
收件者: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

未讀,
2021年9月20日 下午3:09:482021/9/20
收件者:Gremlin-users
回覆所有人
回覆作者
轉寄
0 則新訊息