feat: upgrade to Spring Boot 4.1.0 - #2194
Draft
JordanJLopez wants to merge 4 commits into
Draft
Conversation
Bumps spring-boot to 4.1.0, spring-framework to 7.0.8, kotlin to 2.3.21, reactor-core to 3.8.6, reactor-extensions to 1.3.1, and compile-testing to 0.12.1 to align with the new BOM. Fixes a KotlinReflectionInternalError introduced in Kotlin 2.3.21 where accessing annotations on KParameter instances from annotation class constructors throws "Unsupported parameter owner: null". The fix guards findConstructorParameter to return null for annotation classes, which is correct since directive annotation elements cannot be annotated with @GraphQLIgnore via constructor parameters. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR upgrades core platform dependencies to align with the Spring Boot 4.1.0 BOM (including Spring Framework, Kotlin, and Reactor) and includes a small schema-generator safety guard to avoid a Kotlin 2.3.21 reflection crash when inspecting annotation-class constructors.
Changes:
- Bump Spring Boot to 4.1.0 (and Spring Framework to 7.0.8) plus aligned Reactor/Kotlin versions via
libs.versions.toml. - Update
compile-testing(kctfork) to 0.12.1 to better align with Kotlin 2.3.x. - Prevent Kotlin reflection failures by short-circuiting
findConstructorParameterfor annotation classes.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| gradle/libs.versions.toml | Updates Kotlin/Spring/Reactor/compile-testing versions to match the Spring Boot 4.1.0 BOM and Kotlin 2.3.x tooling alignment. |
| generator/graphql-kotlin-schema-generator/src/main/kotlin/com/expediagroup/graphql/generator/internal/extensions/kClassExtensions.kt | Adds an early return for annotation classes to avoid Kotlin reflection errors when resolving constructor parameters. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Reactor 3.8 added @nullable to Mono.toFuture()'s type parameter, so Kotlin 2.3.21 now infers the result as CompletableFuture<List<T>?>. BatchLoader.load() expects a non-nullable CompletionStage<List<V>>, causing a type mismatch. collectList() never completes empty so !! is safe. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…Future() results Same Reactor 3.8 @nullable type-parameter change as the previous commit, applied to the instrumentation test fixtures (AstronautService, MissionService, PlanetService, ProductService, Nasa). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…linReflectionInternalError
Kotlin 2.3.x throws KotlinReflectionInternalError when accessing annotations
on KParameters from annotation class constructors ("Unsupported parameter
owner: null") or nested class constructors in GraalVM native ("Could not
compute caller for function"). Probing param.annotations eagerly in
findConstructorParameter lets us return null instead of propagating the crash.
The isAnnotation() fast path is kept for the annotation class case; the
try/catch covers GraalVM nested-class constructors and any future variants.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
JordanJLopez
marked this pull request as draft
July 1, 2026 20:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
spring-bootto 4.1.0,spring-frameworkto 7.0.8,kotlinto 2.3.21,reactor-coreto 3.8.6,reactor-extensionsto 1.3.1 — all aligned with the Spring Boot 4.1.0 BOMcompile-testing(kctfork) to 0.12.1, the closest release to Kotlin 2.3.xKotlinReflectionInternalErrorintroduced in Kotlin 2.3.21: accessing.annotationsonKParameterinstances from annotation class constructors now throws "Unsupported parameter owner: null". GuardingfindConstructorParameterto returnnullfor annotation classes prevents the crash; this is correct since directive annotation elements cannot carry@GraphQLIgnorevia constructor parameters anyway.Test plan
./gradlew buildpasses including all unit and integration testsgraphql-kotlin-graalvm-metadata-generator:integrationTest(the test that surfaced the Kotlin reflection regression) passesgraphql-kotlin-spring-serverandgraphql-kotlin-spring-clienttests pass against the updated reactor versionsgraphql-kotlin-client-generatortests pass against kctfork 0.12.1🤖 Generated with Claude Code