-
Notifications
You must be signed in to change notification settings - Fork 2k
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
jpms / modular dagger #2636
Comments
Duplicate of #1079 |
@tbroyer sure? The other issue seems to be about adding an "Automatic-Module-Name". But I'm afraid that's not even good enough for jlink. Read the jlink error again: |
Thanks for the reminder about #1079. I had started on the work to add the automatic module name but never finished submitting it. For the bigger question of modularizing Dagger, I don't think it is a high priority for us right now when compared to other work we have planned. I'm going to leave this open since it is something we should do, but I can't say when it will be done or that we are looking at this with any urgency right now. Sorry about that =\ |
Hi, thanks for the update. I figured I can use dagger in jbock and still be fully jlink-compatible. This is possible because jbock is an annotation processor itself, so it is not a runtime dependency for its users. I added a module-info to its runtime jar However, this happy workaround is apparently not available for anything that isn't an annotation processor itself. Dagger cannot be used in a basic jlink-packaged application, like this one. Is that correct? Another idea: To modularize dagger, it would be enough to add the module descriptor to its runtime jar |
I've noticed jlink doesn't work unless every dependency has a module info.
I've tried and got this far:
Error: automatic module cannot be used with jlink
It seems dagger doesn't even set
Automatic-Module-Name
in the MANIFEST.Are there any plans to release a dagger version with
module-info.java
included?Because currently it seems like code that uses dagger can't be fully modular, and it looks like that means you won't be able use jlink, to make a custom jdk image of it.
Likewise, any library code that uses the dagger annotations will also become a roadblock to modularization.
This seems pretty bad. I've just finished adding dagger to my pet command line parser.
Will I have to rip it out again? Ugh.
Custom runtime images are going to be very important for command line applications, imho.
Please respond.
The text was updated successfully, but these errors were encountered: