Prepare Kotlin 2.4.20 support - #202
Draft
carlonzo wants to merge 2 commits into
Draft
Conversation
Registers 2.4.20[2.4.20-Beta1] in versionSupport.kotlin and switches dev-support to it, following the same pattern used for previous new-baseline bumps (e.g. 2.3.0-Beta2, 2.4.0). Kotlin 2.4.20 changes three compiler-internal APIs SKIE depends on: - `KotlinLibrary.isFromKotlinNativeDistribution` was split into `isImplicitlyLoadedFromKotlinNativeDistribution` and `isExplicitlySpecifiedByUserInCLIArgument`; defaultLibraries.kt now uses the renamed property. The prior 2.4.0.. shim is capped at the 2.4.0 baseline. - `CompilerConfiguration.messageCollector` is now gated behind the `MessageCollectorAccess` opt-in marker; KonanConfigCompat.kt's reportCompilerMessage shim opts in explicitly for 2.4.20+. - `IrSimpleFunction` gained a new abstract member `companionExtensionClass` (companion-extension support). DummyIrSimpleFunction — a short-lived symbol-table placeholder that is never read past its declaration (see FunctionTemplate.declareSymbol) — stubs it the same way as its other members. The 2.1.20.. source set is capped at 2.4.0 and a 2.4.20.. copy adds the new override. - CodegenPhaseInterceptor.kt's debug-prefix-map workaround switched from poking NativeGenerationState.context.messageCollector directly (removed in 2.4.20) to the existing cross-version reportCompilerMessage compat shim, which already covers every supported Kotlin version. Verified by compiling :kotlin-compiler:kotlin-compiler-linker-plugin:compileKotlin against 2.0.0, 2.4.0(2.4.10), and 2.4.20[2.4.20-Beta1]. Since 2.4.20 is still in Beta, this targets the version as [2.4.20-Beta1] per the existing pre-release convention; the compiler-version override can be dropped once the 2.4.20 release ships. Claude-Session: https://claude.ai/code/session_01NRKECdAMmkWgARLzE2sjUo
Seeds SKIE/acceptance-tests/libraries/src/test/resources/tests/2.4.20 by copying
the 2.4.0 libraries.lock and expected-failures verbatim, following the same
pattern used when 2.4.0 was added (see "Copy library tests lockfile and expected
failures from 2.3.20 for 2.4.0"). The actual libraries.lock/expected-failures
content will need to be validated and updated by the real
:acceptance-tests:libraries:test run against 2.4.20 in CI, since that requires
resolving and compiling ~6.7k external KMP libraries — not something feasible to
run to completion outside CI.
Adds smoke-tests-2_4_20-{github,self-hosted}.yml (generated via the
generateCIActions Gradle task, now that the seeded libraries.lock gives it a
library count to batch) and bumps the default Kotlin version in smoke-tests.yml
/ smoke-tests-manual.yml from 2.4.0 to 2.4.20, matching the exact pattern from
"Add CI workflows for Kotlin 2.4.0".
Claude-Session: https://claude.ai/code/session_01NRKECdAMmkWgARLzE2sjUo
carlonzo
force-pushed
the
kotlin-2-4-20-beta-support
branch
from
July 21, 2026 21:38
af613c6 to
9fc333c
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
Preparing SKIE to be ready for Kotlin 2.4.20
Stacked on touchlab/SKIE #201 (Kotlin 2.4.10 patch support)
Changes
KotlinLibrary.isFromKotlinNativeDistributionwas split intoisImplicitlyLoadedFromKotlinNativeDistribution/isExplicitlySpecifiedByUserInCLIArgument.defaultLibraries.ktis updated to use the renamed property; the prior2.4.0..shim is capped at the2.4.0baseline.CompilerConfiguration.messageCollectoris now gated behind theMessageCollectorAccessopt-in marker.KonanConfigCompat.kt'sreportCompilerMessageshim opts in explicitly for 2.4.20+.IrSimpleFunctiongained a new abstract membercompanionExtensionClass(companion-extension support).DummyIrSimpleFunction— a short-lived symbol-table placeholder that's never read past its declaration (seeFunctionTemplate.declareSymbol) — stubs it the same way as its other members. The2.1.20..source set is capped at2.4.0and a2.4.20..copy adds the new override.CodegenPhaseInterceptor.kt's debug-prefix-map workaround switched from pokingNativeGenerationState.context.messageCollectordirectly (removed in 2.4.20) to the existing cross-versionreportCompilerMessagecompat shim, which already covers every supported Kotlin version — this is a version-agnostic fix insrc/main.Verified locally by compiling
:kotlin-compiler:kotlin-compiler-linker-plugin:compileKotlinagainst2.0.0,2.4.0(2.4.10), and2.4.20[2.4.20-Beta1].The copied
libraries.lock/expected-failuresfor 2.4.20 are not yet validated against the new compiler — that requires the real:acceptance-tests:libraries:testrun (~6.7k external KMP libraries) in CI, which isn't feasible to run to completion outside CI. Expect some libraries to need new/updated expected-failure entries once that runs.Since 2.4.20 is still in Beta, this targets
[2.4.20-Beta1]per the existing pre-release convention; the compiler-version override can be dropped once the 2.4.20 release ships.