r2dbc-spi
r2dbc-spi copied to clipboard
Add full JPMS module descriptor
Feature Request
Add a full module descriptor for improved use with JPMS. See also https://github.com/reactive-streams/reactive-streams-jvm/issues/531
Is your feature request related to a problem? Please describe
r2dbc-spi doesn't have a full module descriptor. At the moment, it only has a stable automatic module name.
A full module descriptor is a requirement for some tools, like JLink. The module system in general has better support for full modules – for example, compiling requires transitive r2dbc.spi
currently produces a warning about automatic modules.
Describe the solution you'd like
A module descriptor is added to the R2DBC-Spi jar, either at the root of the jar, or in a multi-release directory.
Describe alternatives you've considered
Continue to use the Automatic-Module-Name
manifest entry. This has the drawbacks mentioned previously.
Teachability, Documentation, Adoption, Migration Strategy
Users don't have to do anything. The module name would stay the same, but instead of being an automatic module, R2DBC-Spi would become a full JPMS module.
The feature would ideally be mentioned in the release notes.
Adding module-info.java would mean that R2DBC is no longer compatible with JDK 8.
Oracle R2DBC is already modular, and requires JDK 11 or newer, so it wouldn't be effected by this change.
So what about the other drivers and frameworks that consume R2DBC? Are we all ready to leave JDK 8 behind?
So what about the other drivers and frameworks that consume R2DBC?
The jOOQ Open Source Edition has JDK 11 as a baseline already, so jOOQ could live with that.
It isn't true that adding a module descriptor necessitates dropping Java 8 compatibility. There are a few ways to create a modular jar which is compatible with JDK 8.
Oh, I see, you're right!
Creating a multi-release jar seems like a nice approach: https://openjdk.java.net/jeps/238#Modular-multi-release-JAR-files