-
Notifications
You must be signed in to change notification settings - Fork 353
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
Add module descriptor #4559
Comments
@smillst Any update on this issue? |
I am currently in the process of modularizing some projects in order to use
Are there any plans for (or is there at least any interest in) adding proper modulization support to checkerframework (at least for the client-facing artifacts such as Since I am in a similar boat of wanting to add modulization support without breaking Java 8 compatibility, I can report that this can be relatively cleanly implemented with Multi-Release JARs indeed. There are only small "drawbacks" to this approach:
If wanted, I can try to sketch an initial PR draft for this feature. However, since I am more used to Maven than Gradle and I am rather unfarmiliar with all the intrinsics of the checkerframework build process, I'll probably need some hand holding later. |
@mtf90 Thanks for bringing this up. Modularization isn't high on our priority list, but we would welcome it. If you can take the lead, we would gladly help. Thank you! Requiring a Java 9+ JDK to build the Checker Framework is not a problem. |
Dear @mernst, I have good news and bad news: The good news is that adding a The bad news is that Gradle broke me. I have drafted a PR (#6326) which ... works. It creates a The changes itself could potentially be implemented more elegantly. I think sourceSets are probably the way to go but I couldn't get them to share folders while having separate compile executions. Also, the dependencies between the different tasks are a little bit overwhelming so the config looks a little bit patched together. There is one big workaround that I am still unhappy with. Initially, the javadoc generation failed because in a module-senstive environment the I am happy to discuss further actions or handing things over to the Checkerframework team. Do you want to continue on this issue or the PR? |
@smillst Could you please take over? |
Just a heads-up for everyone that faces similar
In case of a distributed application the missing annotations should not matter, because the user of the application typically does not care about the application's internals (e.g., which classes it uses, etc.). In case of a library-like artifact, any code that would make use of the annotations (e.g., for nullness analysis) would add its own dependency on This should take some pressure off this issue, as I mentioned in #6326 (comment) that it may take some effort to support modules cleanly. For now, an |
@sgammon Thanks for the ping. |
Add module descriptor (
module-info.java
)It's possible to use multi-release jar to support both Java 8 and have module descriptor
Compiled module descriptor should be here
META-INF/versions/9/module-info.class
The text was updated successfully, but these errors were encountered: