-
Notifications
You must be signed in to change notification settings - Fork 172
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
Modularization (JPMS) #1036
Comments
Shouldn't we already be fine? All classes in asciidoctorj-api and asciidoctorj are in disjoint packages.
As JRuby loads classes like sun.nio.ch.NativeThread JRuby should probably add this to their module descriptor (which they don't seem to have yet and also rely on the auto-module mechanism) |
Even if not necessary it would stil be nice to have. If only for those internal packages. Tbh I was expecting to be simple, but the osgi thing did not make it possible, the mudule configuration was simple enough https://github.com/asciidoctor/asciidoctorj/compare/main...abelsromero:poc/modules?expand=1 |
I see. I guess I don't understand JPMS good enough yet, I thought that you could use almost every jar as an automatic module and java also gives it a name:
|
Tbh, I am longer sure of the path and I also need to read the docs further. Modularization feels the correct thing to do, but seems to cause more issues than features. I guess we can leave this in stand-by for now. |
Funny enough I have no problem compiling asciidoctorj-api with this simple command and the module-info.java that you have provided:
The modules directory only contains the file And after jar'ing the contents of the classes directory I get this:
I really wish this isn't Gradle this time... |
The need for proper modules support is starting to be nessary, at least to avoid warning (unless I am wrong #1035).
I started working on it but got stuck when dealing with
import org.osgi.annotation.bundle.Export;
in thepackage-info-java
.We don't really need those since this is for osgi, but the compiler complains anyway. Also Intellij suggests requiring
osgi.annotations
, but the compiler still complains 🤕 .Maybe the solution would be to explore some other configuration methd (no osgie expert myself) based on other descriptors that do not require code compilation.
The text was updated successfully, but these errors were encountered: