deepjavalibrary / djl

An Engine-Agnostic Deep Learning Framework in Java
https://djl.ai
Apache License 2.0
4.14k stars 658 forks source link

Please add JPMS/module-info data to this project #3473

Open Siedlerchr opened 1 month ago

Siedlerchr commented 1 month ago

Description

For better usage in a modularized application and to prevent hacky workarounds, it would be great to provide the correct module info declaration. Especially for the ServiceProviders. Refs https://github.com/JabRef/jabref/pull/11761

https://www.oracle.com/corporate/features/understanding-java-9-modules.html

Will this change the current api? How?

No

Who will benefit from this enhancement?

Consumers of the libary e.g. JabRef https://github.com/JabRef/jabref/pull/11761

References

Langchain: https://github.com/langchain4j/langchain4j/issues/1066 https://www.oracle.com/corporate/features/understanding-java-9-modules.html https://javanexus.com/blog/solving-puzzle-java-9-module-system-challenges https://www.baeldung.com/java-modularity

frankfliu commented 1 month ago

@Siedlerchr

We already support auto-module in DJL. Here is example: https://github.com/deepjavalibrary/djl-demo/tree/master/development/module

Siedlerchr commented 1 month ago

Yes, that's a good thing but explicit module would be better, especially regarding the zoo service provider. You need to add a provides clause see https://github.com/JabRef/jabref/pull/11761/files for what we needed to do