Kotlin: support 2.4.20-RC - #22404
Draft
andersfugmann wants to merge 2 commits into
Draft
Conversation
andersfugmann
force-pushed
the
andersfugmann/kotlin-2.4.20rc
branch
3 times, most recently
from
August 24, 2026 13:46
a205abc to
e280a20
Compare
Add standalone and embeddable extractor variants for the published RC. Adapt plugin registration to two Kotlin 2.4.20 Beta2 changes: - KT-85816 removes the remaining ComponentRegistrar usage. - KT-86046 applies K1Deprecation to public K1 APIs. Use CompilerPluginRegistrar without loading the removed legacy API for the RC, while retaining the legacy path for older compilers. Opt in to the K1 compatibility APIs that the extractor still requires. The RC also gives generated interface forwarders synthetic source offsets. Use their enclosing class location to preserve previous database and query behaviour. Keep Kotlin 2.4.20 GA above the supported-version boundary. Kotlin changelog: https://github.com/JetBrains/kotlin/blob/v2.4.20-RC/ChangeLog.md#2420-beta2 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use the published RC by default in the development wrapper so the Kotlin 2 suite exercises the compiler compatibility changes from KT-85816 and KT-86046. Use Kotlin 2.4.20 GA in the too-new diagnostic fixture to verify that support remains limited to the RC. Kotlin changelog: https://github.com/JetBrains/kotlin/blob/v2.4.20-RC/ChangeLog.md#2420-beta2 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
andersfugmann
force-pushed
the
andersfugmann/kotlin-2.4.20rc
branch
from
August 24, 2026 14:18
e280a20 to
a0fb883
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.Parent PR: github/semmle-code#56185
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
v2.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.