Skip to content

feat: upgrade to Spring Boot 4.1.0 - #2194

Draft
JordanJLopez wants to merge 4 commits into
masterfrom
spring-boot-4.1.0
Draft

feat: upgrade to Spring Boot 4.1.0#2194
JordanJLopez wants to merge 4 commits into
masterfrom
spring-boot-4.1.0

Conversation

@JordanJLopez

Copy link
Copy Markdown
Collaborator

Summary

  • 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 — all aligned with the Spring Boot 4.1.0 BOM
  • Bumps compile-testing (kctfork) to 0.12.1, the closest release to Kotlin 2.3.x
  • Fixes a KotlinReflectionInternalError introduced in Kotlin 2.3.21: accessing .annotations on KParameter instances from annotation class constructors now throws "Unsupported parameter owner: null". Guarding findConstructorParameter to return null for annotation classes prevents the crash; this is correct since directive annotation elements cannot carry @GraphQLIgnore via constructor parameters anyway.

Test plan

  • Full ./gradlew build passes including all unit and integration tests
  • graphql-kotlin-graalvm-metadata-generator:integrationTest (the test that surfaced the Kotlin reflection regression) passes
  • graphql-kotlin-spring-server and graphql-kotlin-spring-client tests pass against the updated reactor versions
  • graphql-kotlin-client-generator tests pass against kctfork 0.12.1

🤖 Generated with Claude Code

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>
@JordanJLopez
JordanJLopez requested a review from Copilot June 30, 2026 20:50
@JordanJLopez JordanJLopez changed the title chore: upgrade to Spring Boot 4.1.0 feat: upgrade to Spring Boot 4.1.0 Jun 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 findConstructorParameter for 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.

Jordan Lopez and others added 3 commits June 30, 2026 16:04
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
JordanJLopez marked this pull request as draft July 1, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants