Closed rashtao closed 1 month ago
Interesting, I thought provides
was included as format modules do that.
My main/only concern is that in this case it'd be something like
provides com.fasterxml.jackson.core.JsonFactory with
com.fasterxml.jackson.core.JsonFactory;
which I am not sure works as expected (JsonFactory
is only sub-classed by format module implementations in 2.x, basic JsonFactory
implements JSON support)
@rashtao Would it be possible for you to locally build from 2.18
branch, with modified src/moditect/module-info.java
to add "provides" directive, and check if that'd work? I can make PR, change, but woudl need someone to validate proposed fix.
EDIT: looks like there is #1339 already, will follow up on that.
Hi @cowtowncoder ,
I have manually checked that the changes work when building from 2.18
. Thanks!
Thank you for confirming @rashtao ! I hope to release 2.18.0 by end of week.
SPI does not work in Java projects using JPMS, since
module-info.java
does not contains anyprovides
directive.To reproduce, I created a Java project with:
module-info.java
main