Skip to content

Kotlin 2.4.0 support - #54

Merged
jeppeman merged 1 commit into
jeppeman:mainfrom
wiyarmir:kotlin-2.4.0-support
Jun 19, 2026
Merged

jeppeman merged 1 commit into
jeppeman:mainfrom
wiyarmir:kotlin-2.4.0-support

Conversation

@wiyarmir

@wiyarmir wiyarmir commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Adds Kotlin 2.4.0 support.

Closes #55

2.4.0 removed the deprecated IR APIs the transforms used (getValueArgument/putValueArgument/putTypeArgument/valueArgumentsCount/valueParameters/extensionReceiverParameter), so the compiler module no longer built. It also reshaped IrGenerationExtension.Companion, which made registerExtensions throw a ClassCastException at runtime for anyone building against 2.4.0 with a 0.18 jar.

  • Migrate the transforms to the unified parameter/argument model (arguments[…], typeArguments[…], parameters, IrParameterKind.ExtensionReceiver).
  • kotlin 2.3.20 → 2.4.0, google-ksp 2.3.6 → 2.3.9, kctfork 0.12.1 → 0.13.0 (0.12.1 passes null to the now non-null optIn arg and breaks the compiler tests on 2.4.0).

The IrGenerationExtension.registerExtension(...) call is unchanged; recompiling against 2.4.0 is enough since the crash was a binary-skew artifact.

./gradlew :mockposable-compiler:test passes (MockK + Mockito).

Code assisted by Claude Code

@wiyarmir wiyarmir mentioned this pull request Jun 16, 2026
@jeppeman

Copy link
Copy Markdown
Owner

Hey @wiyarmir, thanks for contributing! Can you sync with upstream and push again? I added pull_request to the workflow triggers so that fork PRs get built with actions.

@wiyarmir
wiyarmir force-pushed the kotlin-2.4.0-support branch from fa28ecc to 3825967 Compare June 19, 2026 09:56
@wiyarmir
wiyarmir marked this pull request as ready for review June 19, 2026 09:58
@wiyarmir

Copy link
Copy Markdown
Contributor Author

@jeppeman done! 🫡

@jeppeman

Copy link
Copy Markdown
Owner

LGTM, thanks again. Will publish a new version shortly

@jeppeman
jeppeman merged commit a39e7df into jeppeman:main Jun 19, 2026
1 check passed
@jeppeman

Copy link
Copy Markdown
Owner

0.19 is available now

@wiyarmir
wiyarmir deleted the kotlin-2.4.0-support branch September 11, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kotlin 2.4.0 Support

2 participants