-
Notifications
You must be signed in to change notification settings - Fork 21
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
Consider Jackson 4.0.0 branch built with Java 11 and supporting the Java Module System #10
Comments
I should add that modules could also help structure Jacksons code. jackson-databind depends on java.desktop, java.sql, and java.xml, for example, and since most developers don't make use of when using Jackson, databind could be split into modules databind.sql, databind.xml, etc. |
Please do not file issues suggesting wide-ranging fundamental changes; instead bring them up on mailing lists. That's a good place to discuss these. There are plans to use Moditect to make 2.10 and onwards (more) forwards-compatible, being built using JDK 8, but having basic module definitions, but still targeting Java 7 bytecode. Latter may become non-goal. For 3.x this is the minimum baseline as well: baseline was moved to Java 8. |
Using Moditect to generate module definitions would be very nice, hopefully databind is published in multiple modules (so that one does not have to rely on all each java.[xml, desktop, sql]). I agree that the module system is somewhat of a pain and will have slower adoption. It's quite useful to build super-small docker images though (has saved us some money at least). And I'd expect that when Valhalla releases with value types in a year or two, there will be a big migration like with lambdas. |
The issue of what to do with non-core JDK datatypes is interesting. Perhaps it'd be best to cleave them out and add a separate "jackson-datatype-jdk[11]"... As to Moditect, I will either need to find time to dig into it, or get help -- some contributors have helped with prototype, but I don't think we have yet functional solution that I find good enough (there have been discussions on baseline, requirements and so on). |
Jackson is a great library, but its frustrating that we can't use it with the Java Module System. Yes, jackson does have automatic module names, but you cannot build a minimal application image (jlink) or installer (jpackage) without explicit module-infos.
I tried forking jackson databind and its dependent projects, generating module-infos with jdeps, and then using
javac --patch-module
to repackage, but jlink still fails because it sees the Automatic Module Name field.Although maintaining another branch may be require extra work, I think its worth considering to get the performance and size benefits of Java 11's defining feature. And since Java 11 is LTS, I expect the 4.0.0 branch would be created eventually.
The text was updated successfully, but these errors were encountered: