Skip to content

Massive migration from context receivers to context parameters#190

Open
LionZXY wants to merge 1 commit into
touchlab:mainfrom
LionZXY:bump/kotlin_2320
Open

Massive migration from context receivers to context parameters#190
LionZXY wants to merge 1 commit into
touchlab:mainfrom
LionZXY:bump/kotlin_2320

Conversation

@LionZXY

@LionZXY LionZXY commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Kotlin 2.3.20 removed context receivers (CONTEXT_RECEIVERS_DEPRECATED is now a hard error and can no longer be downgraded), so compiling SKIE's own sources with the 2.3.20 compiler requires migrating off them. This bumps the build Kotlin version in libs.versions.toml from 2.2.20 to 2.3.20.

Migrates 163 files (kotlin-compiler core/linker-plugin and acceptance-tests) from context(T) receivers to named context(context: T) parameters, qualifying the previously-implicit context-member accesses (e.g. context.sirProvider) and replacing this@Context labels. The build plugin switches from enableLanguageFeature("ContextReceivers") + -Xwarning-level=CONTEXT_RECEIVERS_DEPRECATED:disabled to -Xcontext-parameters.

All linker-plugin variants (2.0.0 through 2.3.20) are compiled by the KGP-bundled 2.3.20 compiler and still build, so SKIE's multi-version target support is unchanged.

@LionZXY LionZXY force-pushed the bump/kotlin_2320 branch from 7eedda5 to 2ccae8a Compare June 3, 2026 15:01
@LionZXY LionZXY changed the title Massive migrate from context receivers to context parameters Massive migration from context receivers to context parameters Jun 3, 2026
@LionZXY LionZXY mentioned this pull request Jun 3, 2026
@TadeasKriz

TadeasKriz commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Hi @LionZXY, I apologize for the long silence. When you opened the PR I was already working on this too and both this PR and my changes now have bunch of conflicts with the main branch. I'll probably rebase your branch, resolve the conflicts and then make some changes to some of the context usages before merging it.

In any case, thank you for your contributions!

(-.- clicked the wrong button, didn't mean to close this, just comment)

@TadeasKriz TadeasKriz closed this Jul 13, 2026
@TadeasKriz TadeasKriz reopened this Jul 13, 2026
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.

2 participants