Repository navigation
test(ktor): [Ktor 3.6 3] Add Ktor 3.0 compatibility suite - #6520
Merged
adinauer merged 3 commits intoNov 11, 2026
Merged
Conversation
Compile the production integration against the catalog Ktor version while compiling and running the existing tests against Ktor 3.0.0. Add the compatibility suite to check so inline API binary incompatibilities fail CI.
📲 Install BuildsAndroid
|
This was referenced Nov 9, 2026
adinauer
marked this pull request as ready for review
November 9, 2026 13:53
adinauer
requested review from
0xadam-brown and
runningcode
and removed request for
a team
November 9, 2026 13:53
runningcode
reviewed
Nov 9, 2026
runningcode
left a comment
Contributor
There was a problem hiding this comment.
This works, I checked the build scan! I left two comments https://scans.gradle.com/s/w4a5ctbzeojsu/dependencies?dependenciesSearchText=ktor&expandAll&toggled=W1swLDBdLFswLDFdLFswLDFdXQ
runningcode
reviewed
Nov 9, 2026
runningcode
reviewed
Nov 9, 2026
Use Ktor's enforced platform to pin all compatibility test artifacts to 3.0.0 instead of maintaining a custom resolution strategy. Reuse the standard test source directories so the suite follows source changes. Co-Authored-By: Claude <noreply@anthropic.com>
runningcode
approved these changes
Nov 11, 2026
runningcode
left a comment
Contributor
There was a problem hiding this comment.
Looks good! just one comment worth looking at before merging!
Co-authored-by: Nelson Osacky <nelson.osacky@sentry.io>
adinauer
added a commit
that referenced
this pull request
Nov 11, 2026
* fix(ktor): Preserve Ktor 3.0 runtime compatibility Avoid inlining Ktor 3.6's AttributeKey factory. The inlined code references a TypeInfo constructor unavailable in older Ktor 3.x runtimes. Construct TypeInfo explicitly through its stable two-argument constructor instead. * test(ktor): [Ktor 3.6 3] Add Ktor 3.0 compatibility suite (#6520) * test(ktor): Add Ktor 3.0 compatibility suite Compile the production integration against the catalog Ktor version while compiling and running the existing tests against Ktor 3.0.0. Add the compatibility suite to check so inline API binary incompatibilities fail CI. * test(ktor): Simplify Ktor 3.0 suite configuration Use Ktor's enforced platform to pin all compatibility test artifacts to 3.0.0 instead of maintaining a custom resolution strategy. Reuse the standard test source directories so the suite follows source changes. Co-Authored-By: Claude <noreply@anthropic.com> * Update sentry-ktor-client/build.gradle.kts Co-authored-by: Nelson Osacky <nelson.osacky@sentry.io> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Nelson Osacky <nelson.osacky@sentry.io> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Nelson Osacky <nelson.osacky@sentry.io>
adinauer
added a commit
that referenced
this pull request
Nov 11, 2026
* chore(deps): bump ktorClient from 3.0.0 to 3.6.1 Bumps `ktorClient` from 3.0.0 to 3.6.1. Updates `io.ktor:ktor-client-core` from 3.0.0 to 3.6.1 - [Release notes](https://github.com/ktorio/ktor/releases) - [Changelog](https://github.com/ktorio/ktor/blob/3.6.1/CHANGELOG.md) - [Commits](ktorio/ktor@3.0.0...3.6.1) Updates `io.ktor:ktor-client-java` from 3.0.0 to 3.6.1 - [Release notes](https://github.com/ktorio/ktor/releases) - [Changelog](https://github.com/ktorio/ktor/blob/3.6.1/CHANGELOG.md) - [Commits](ktorio/ktor@3.0.0...3.6.1) --- updated-dependencies: - dependency-name: io.ktor:ktor-client-core dependency-version: 3.6.1 dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: io.ktor:ktor-client-java dependency-version: 3.6.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * fix(ktor): [Ktor 3.6 2] Preserve Ktor 3.0 runtime compatibility (#6517) * fix(ktor): Preserve Ktor 3.0 runtime compatibility Avoid inlining Ktor 3.6's AttributeKey factory. The inlined code references a TypeInfo constructor unavailable in older Ktor 3.x runtimes. Construct TypeInfo explicitly through its stable two-argument constructor instead. * test(ktor): [Ktor 3.6 3] Add Ktor 3.0 compatibility suite (#6520) * test(ktor): Add Ktor 3.0 compatibility suite Compile the production integration against the catalog Ktor version while compiling and running the existing tests against Ktor 3.0.0. Add the compatibility suite to check so inline API binary incompatibilities fail CI. * test(ktor): Simplify Ktor 3.0 suite configuration Use Ktor's enforced platform to pin all compatibility test artifacts to 3.0.0 instead of maintaining a custom resolution strategy. Reuse the standard test source directories so the suite follows source changes. Co-Authored-By: Claude <noreply@anthropic.com> * Update sentry-ktor-client/build.gradle.kts Co-authored-by: Nelson Osacky <nelson.osacky@sentry.io> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Nelson Osacky <nelson.osacky@sentry.io> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Nelson Osacky <nelson.osacky@sentry.io> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alexander Dinauer <adinauer@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Nelson Osacky <nelson.osacky@sentry.io>
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.
PR Stack (Ktor 3.6)
📜 Description
Add a
testKtor300JVM test suite that recompiles the existing Ktor client tests against Ktor 3.0.0 and runs them with the complete Ktor 3.0.0 runtime dependency graph.The production integration remains compiled against the catalog's Ktor 3.6.1 version. The compatibility suite is attached to
checkand exercises those production classes through a real Ktor Java client and localMockWebServer.💡 Motivation and Context
Kotlin inline APIs can embed references to dependency internals in the compiled SDK classes. The regular test suite only verifies the current Ktor version, so it would not detect a reference that is unavailable in the oldest supported Ktor 3 runtime.
Compiling the compatibility test sources against Ktor 3.0.0 also ensures the test application uses Ktor 3.0's normal transitive dependencies, including coroutines 1.9.0, instead of accidentally retaining the latest runtime graph.
💚 How did you test it?
./gradlew spotlessApply updateKotlinAbi./gradlew :sentry-ktor-client:check; the 32 tests passed with both Ktor 3.6.1 and Ktor 3.0.0ktor-client-core:3.0.0andkotlinx-coroutines-core:1.9.0for the compatibility suiteAttributeKeyimplementation and confirmedtestKtor300fails with the expectedTypeInfo(KClass, boolean, KType)NoSuchMethodError📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
None.
#skip-changelog