Kotlin: support 2.4.20-RC - #22404
Draft
andersfugmann wants to merge 7 commits into
Draft
Conversation
andersfugmann
force-pushed
the
andersfugmann/kotlin-2.4.20rc
branch
7 times, most recently
from
August 26, 2026 10:43
f74d5b1 to
2fa6f32
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Kotlin 2.4.20-RC removes the remaining ComponentRegistrar API under KT-85816. Use an RC-specific registrar that only implements CompilerPluginRegistrar, and package the legacy ComponentRegistrar service only for older compilers. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Kotlin 2.4.20-RC marks public K1 APIs with K1Deprecation under KT-86046 and rejects the previous repeatable-annotation IR access path. Opt in to K1Deprecation for 2.4.20 and later, and use the existing annotationClass compatibility extension. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Kotlin 2.4.20-RC assigns synthetic source offsets to generated interface forwarders. Use the enclosing class location for each fabricated forwarder and its generated body and accesses, preserving existing database and query output. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
andersfugmann
force-pushed
the
andersfugmann/kotlin-2.4.20rc
branch
from
August 26, 2026 11:25
2fa6f32 to
b9c81d5
Compare
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
Support Kotlin 2.4.20-RC in the Kotlin extractor. Kotlin 2.4.20 GA remains unsupported.
The implementation is split between release-driven compatibility changes and two observed RC behaviours. The release changelog explicitly removes remaining
ComponentRegistrarusage (KT-85816) and applies@K1Deprecationto public K1 APIs (KT-86046). The RC compiler also gives generated interface forwarders synthetic source offsets and rejects the previous repeatable-annotation access path. The extractor adapts to those behaviours without changing query results.Motivation for each change
v2.4.20-RCcompiler rather than an inferred compatible version.CompilerPluginRegistrarimplementationComponentRegistraris absent from the RC compiler, matching KT-85816. The existing registrar cannot be loaded because it implements both APIs.ComponentRegistrarservice only before 2.4.20org.jetbrains.kotlin.K1Deprecationfrom 2.4.20annotationClasscompatibility extensionconstructedClassand also compiles with the oldest supported Kotlin 1.8.0 compiler.Compatibility
Validation
VERSIONSv2.4.20-RCcompiler passed the Kotlin basic functionality extraction test2.4.20GANo tests are disabled. The only changed generated expectation is the too-new diagnostic.