Picocli allows using a compiler annotation processor to generate classes at compile time instead [0].
[0]: https://github.com/remkop/picocli/blob/main/picocli-codegen/...
Yes, Jackson really was a bummer. To this day I can't understand how a project like Springboot advertises Graalvm readiness when Jackson is not supported without tweaks. What do the Springboot devs think we are using Springboot for, Hello World blog posts?
Re:GraalVM for JDK 21 is here
by CrimsonRain on Tuesday September 19, 2023 @03:32PM
(#37575181)
What's wrong with it? Genuinely curious. I've using Graal with spring/Jackson for a long time and haven't noticed any issue.
From my understanding, Spring Boot takes care of providing the JSON metadata for many libraries, including Jackson. So in practice, it can be more straightforward to use it in a Spring Boot project.
Re:GraalVM for JDK 21 is here
by eddythompson80 on Tuesday September 19, 2023 @03:13PM
(#37574885)
this was our experience as well. Both with GraalVM/Quarkus and .NET CrossGen/Native/CoreRT. It's almost a different platform that's far less supported and less stable. Even if you put in the work to make things work, they'll eventually break. Quarkus tries to give a full experience like Kotlin Native, but both are also not really there.
It's really unfortunate how Java and C# are perceived as slow because of their painful startup time.
ye even less relevant for that usecase with snapstart.
SnapStart for Java 17 was only released very recently, so if you are a bit early in the cycle it doesn't help. Don't even want to guess when it will be available for Java 21.
Re:GraalVM for JDK 21 is here
by invalidname on Tuesday September 19, 2023 @11:30PM
(#37580094)
GraalVM has an agent you can use to run your project. It then generates the dependency file for you and you can then use that file to compile the native code.
If you use a framework like Spring Boot then you don't even need that. Just upgrade to 3+ and Jackson, Hibernate (and maybe these other APIs) should pretty much work out of the box.
Re:GraalVM for JDK 21 is here
by pharaohgeek on Wednesday September 20, 2023 @08:47AM
(#37583477)
Look at the Quarkus framework. It's designed with Graalvm native in mind, so it knows how to handle Jackson, AWS, etc. and compile them to a native binary. I'm using it in production with a native-compiled Lambda that calls other AWS services. It works GREAT!
Things that broke include: JSON (de)serialization using Jackson, validations using hibernate, validator, AWS SDK, and even simpler libs like picocli...
It could be quite useful for a set of simpler apps though