Repository navigation
Incompatibility with Jackson 3/ Spring Boot 4 #183
Description
Activity
I've started adding support for jackson3, if anyone wants to pick it up;
e46653bSpring boot 4 comes with JUnit 6, so we should probably include a module for that as well.
Reacted by Christian HövelmeyerI created a fork with support for spring boot 4, and jackson 3.
https://github.com/finoid/java-snapshot-testingReacted by Christian Hövelmeyer, Jack Matthews and NicklasWallgrenHi, you are actually able to create your own serializer, no need to fork the entire repo. It was actually intended this way so that community members can maintain their own plugins separate from this project.
You only need a compile time dependency on core.
see docs here: https://github.com/origin-energy/java-snapshot-testing?tab=readme-ov-file#supplying-a-custom-snapshotserializer
Reacted by NicklasWallgren and RainerGanss@NicklasWallgren Your fork does not contain a license - so no one can use it. Could you maybe create a PR back to this repo with your changes?
@NicklasWallgren Your fork does not contain a license - so no one can use it. Could you maybe create a PR back to this repo with your changes?
You can create a PR from this commit if you want;
e46653b@jackmatt2 As you pointed out, one can create a custom serializer. But since JSON is one, you already provide, I would love to see a jackson 3 version of that module. Could you take a look at the code from Nicklas? I tried to understand it but my gradle knowledge is pretty much non existing.
I think I spottet, that only up to junit 5 is supported. Spring boot 4 also uses unit 6 as a new baseline. But that might be worth its one PR.
Like @Christian-Hovelmeyer pointed out in the spring documentation, this jackson 2 backwards compatibility is temporally. I will happily test any PR in our system. For now, I got it to work with jackson 2, but I cant wait to be passed jackson 2.
This jackson2/3 reminds me a lot of jaxb 2/3...
I've just made a PR for that issue: #185
I'm trying to upgrade to Spring Boot 4 which ships with Jackson 3, but this snapshot-testing framework is written and complied against Jackson 2.
There are breaking changes in Jackson 3 as it is a major version update. Most importantly, namespaces changed from 'com.fasterxml' to 'tools'. Class ObjectMapper now resides in tools.jackson.databind. So most classes using Jackson 2 API (except for those using jackson-annotations only) shouldn't compile any longer.
There is a way to use snapshot-testing with SB4/J3 by using a compatibility-dependency as described in https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-4.0-Migration-Guide#jackson-2-compatibility.
BUT as it reads there: "This module ships in a deprecated form and will be removed in a future release. It’s intended as a stop-gap for users that need more time to migrate to Jackson 3."
Without a version that is compatible with Spring Boot 4/ Jackson 3, this framework will not usable in the not so far future.