-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3x: Add full module descriptor #7241
3x: Add full module descriptor #7241
Conversation
Converting to draft as there are 2 standing issues:
See build error: |
@aalmiray , regarding the two issues you mentioned:
Also, I'm not a veteran RxJava user, but I believe the |
This seems like an unnecessarily roundabout way to do this. Here's a simple example that you could just adapt instead: https://github.com/melix/jdoctor/blob/main/jdoctor-build-logic/src/main/kotlin/me.champeau.java-module.gradle.kts |
That would require the use of toolchains and ensuring a Java 9+ JDK to be available at all times. Toolchains are not stable enough, just have a look at the Gradle issue tracker. |
Can you offer a stronger citation? We are using it in several projects with no issues. |
Browse Gradle's issue tracker, they have a label matching toolchains. Look at the number of issues and their assigned milestone. The engineer in charge of toolchains left the company in early June 2021. |
Unless you can point to a specific issue that prohibits its use here, I don't think "go look at the issue tracker" is very constructive. No tool is perfect. We use this in about a dozen projects with varying degrees of complexity and it's been fine. Happy to toss up a PR if that would quell your concerns. |
As you wish. I'm more interested in the outcome (RxJava as a Java module) than how that goal it's achieved. A maintainable option for the project must be found, after all it's "easy" for me to suggest ModiTect as I know it but the RxJava team would have to live with it if the PR is accepted as is. If ModiTect it's not the way then so be it, again the "what" is more important to me than the means to achieve it. One more thing, regardless of how the build is made modular you'd still have to find a solution for reactive-streams becoming modular which is currently blocked by an OSGi compatibility, due to bnd and its companion Gradle plugin. |
Sure, opened a PR here #7332.
I think I've worked around this just suppressing the warning message from bnd (per the original issue you linked), but I'm not sure if/what else would be needed. Considering the issue has been open for 4 years with no movement, it seems unlikely to change. |
Following this last option would require build instructions to re-generate |
It is rare for the main export packages to change. We just had a new package Another middle ground I see is to generate the module file via ASM so there is no need for 9+ compiler and those mockup classes to satisfy it. |
FWIW generating |
I see. In that case, the BND failure can be suppressed. Unless the first point in #7241 is still a concern, this would be good to go. |
Codecov Report
@@ Coverage Diff @@
## 3.x #7241 +/- ##
============================================
+ Coverage 99.53% 99.55% +0.02%
- Complexity 6782 6783 +1
============================================
Files 751 751
Lines 47482 47482
Branches 6378 6378
============================================
+ Hits 47259 47270 +11
+ Misses 103 98 -5
+ Partials 120 114 -6
Continue to review full report at Codecov.
|
I have updated the GHA for the JDK 11 build to verify the module-info. Could you rebase this onto the current 3.x branch? |
9852c6b
to
37b389e
Compare
60f281a
to
82b036b
Compare
@akarnokd PR has been rebased and updated with hints for bnd to skip the error due to |
As described at #7240, add a full Java module descriptor to version 3.x.
This setup lets the 3.x series remain Java 8 compatible while the
module-info.class
is compiled with Java 9+ and stored inside the jar at/META-INF/versions/9
.Resolves #7240.