Skip to content

Align toolchain with host: Kotlin 2.3.x + ktor 3.5.0 + kotlinx-serialization 1.11.0 #269

@kshivang

Description

@kshivang

Goal

Align BossTerm's toolchain with the host (BossConsole) stack so bundled ktor matches the host's parent-first kotlinx-serialization, eliminating binary-compat skew when BossTerm is embedded as a plugin.

Why

compose-ui currently pins Kotlin 2.1.21 + ktor 3.3.2/3.2.3 + kotlinx-serialization-json 1.9.0. BossConsole runs Kotlin 2.3.0 (plugins) + ktor 3.5.0 + kotlinx-serialization-json-io 1.11.0. Because embedders provide kotlinx-serialization parent-first, the bundled ktor's JSON adapter (io.ktor.serialization.kotlinx.json.ExperimentalJsonConverter) calls IoStreamsKt.encodeToSink/decodeFromSource with the 1.9.x signature, but the host has the 1.11.0 signature → method not found. This disabled the terminal-tab plugin at load.

(Short-term unblock is being handled host-side by scoping BinaryCompatibilityValidator to the ai.rever.boss.plugin.* contract — BossConsole#762. This issue is the long-term convergence.)

Blocker discovered

A naive ktor 3.3.2 → 3.5.0 bump does not compile under Kotlin 2.1.21: ktor 3.5.0 pulls Kotlin 2.3.0-metadata deps (serialization 1.11.0, kotlin-stdlib 2.3.21, kotlinx-io 0.9.0), and the 2.1.21 compiler reads metadata only up to 2.2.0. Only ktor 3.5.0 is built against serialization 1.11.0 (3.4.x still uses 1.9.0), so there's no Kotlin-2.1-compatible middle version.

Work

  • Bump Kotlin 2.1.21 → 2.3.x (root build.gradle.kts, compose-ui kotlin("plugin.serialization"), compose compiler plugin).
  • Bump Compose Multiplatform plugin (org.jetbrains.compose) to a version compatible with Kotlin 2.3.x.
  • ktorVersion 3.3.2 → 3.5.0 and ktor-server-cio 3.2.3 → 3.5.0 (single var) in compose-ui/build.gradle.kts.
  • kotlinx-serialization-json 1.9.0 → 1.11.0; review kotlinx-io / coroutines alignment.
  • Fix any compile fallout across compose-ui (Compose/Kotlin 2.3 API changes).
  • Verify :tabbed-example:run / :embedded-example:run; publish; then re-pin the terminal-tab plugin off the new bossterm-compose version.

Prevent recurrence

Adopt a single source of truth for the cross-boundary stack (Kotlin, Compose, ktor, kotlinx-serialization, kotlinx-io) shared by BossConsole + BossTerm + plugins, so host bumps force coordinated updates instead of silent drift.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions