Repository navigation
Conversation
There was a problem hiding this comment.
Nice, that's better. Can you please research a bit Jackson 2.x compatiblity with Kotlin 2.x ?
In general we don't really need boot dependencies, IIRC we only Boot dependencies for:
- jackson (which you replaced with the jackson bom in #1423)
- Reactor imported deps
- Spring Framework for some utils (I think URL utils?)
- Testing libs
- Integration test apps
We could drop the boot dependency management entirely in main, and just pin deps ourselves.
The default Java 8 profile still shipped wire-runtime 3.7.1, which is affected by GHSA-pwf9-q62p-v7wc (uncontrolled recursion on nested groups, fixed in 5.2.0). Since the published 5.x.x artifacts are built with that profile, the fix has to land there, not only in the JDK 17/21 profiles used in CI. wire-runtime-jvm 6.3.0 (and its okio-jvm 3.17.0) is compiled for Java 8, so every profile now uses the same Wire version and the per-profile wire overrides and the wire.suffix switch are gone. Wire needs a Kotlin 2 stdlib, but Spring Boot 2.7's BOM pins kotlin-stdlib to 1.6.21. kotlin-bom 2.0.21 is imported ahead of spring-boot-dependencies so its version wins.
dd83cab to
4cce6e8
Compare
|
Thanks! I rebased on 5.x.x now that #1423 is merged. Both jackson-bom and kotlin-bom are imported before the Boot BOM. About Jackson and Kotlin: they don't really touch each other in our case. Only jackson-module-kotlin depends on Kotlin and we don't use it. Everything we pull in (core, databind, annotations, datatype-jdk8, jjwt-jackson) is plain Java. And if we ever need the Kotlin module, 2.21 is built against Kotlin 2.1 anyway. I ran the unit tests on the rebased branch with Jackson 2.21.7, Wire 6.3.0 and kotlin-stdlib 2.0.21 and everything passed. About dropping the Boot dependency management: I agree, and your list matches what I found. The only Spring code we use outside of tests is UriComponentsBuilder in cloudfoundry-client-reactor. I gave it a quick try on main and noticed a few things:
So my idea for main would be:
What do you think @Kehrlann ? |
Fixes GHSA-pwf9-q62p-v7wc (Wire: uncontrolled recursion on nested groups, fixed in 5.2.0) on
5.x.x. This was split out of #1423.Why
The published 5.x.x artifacts are built with the default Java 8 profile, which still used
wire-runtime3.7.1. Only the JDK 17/21 profiles, which only run in CI, used a newerwire-runtime-jvm. The Dependabot alert shows as fixed only because Dependabot scansmain.Changes
wire-runtime-jvm6.3.0 in all profiles: 6.3.0 and itsokio-jvm3.17.0 are compiled for Java 8, so the default profile can use it too. The per-profile Wire overrides and thewire.suffixswitch are removed, so CI and the published artifacts use the same Wire version.kotlin-bom2.0.21: Wire needs a Kotlin 2 stdlib, but Spring Boot 2.7's BOM would pinkotlin-stdlibto 1.6.21. It's imported beforespring-boot-dependencies, so its version wins.Testing
cloudfoundry-client,-util,-reactorand-operationsbuild, and their unit tests pass. The resolved dependencies arewire-runtime-jvm6.3.0,okio-jvm3.17.0 andkotlin-stdlib2.0.21.jdk-21profile:cloudfoundry-clientand-reactorbuild, and their unit tests pass.