proomt

Search

Search posts, papers, and topics

All posts

KotlinAleksey Zamulla6 min readintermediate

A More Reliable Compilation Scheme for Kotlin Multiplatform Modules

Summary

Kotlin 2.5 introduces an experimental separate compilation mode for multiplatform projects that forces common source sets to compile only against metadata KLIBs, aligning compiler errors with IDE analysis and enabling incremental compilation for common code.

  • Enable with `kotlin.kmp.separateCompilation=true` to make common code compile strictly against metadata, matching IDE diagnostics.
  • Common code can no longer call platform‑specific declarations; you must add explicit `expect/actual` declarations.
  • Overload resolution and type inference become deterministic, preventing runtime mismatches caused by platform‑specific overloads.
  • Separate compilation unlocks incremental compilation for common source sets, improving build times.

Kotlin developers building multiplatform libraries or apps need reliable compile‑time checks and faster incremental builds.

6/10

Related reading

  1. Eliminating AI Code Hallucinations with TypeScript Compiler Diagnostics and TDD Loops

    The article shows how to replace raw TypeScript compiler output with a programmatic JSON feedback loop that merges diagnostics and Vitest test failures, feeding the structured data back to an LLM coding agent for self‑correction. It provides concrete code for extracting, enriching, validating, and de‑duplicating errors, and demonstrates token savings and deterministic iteration until compilation…

    SitePointsitepoint.com15 min
  2. Article: Your Next DSL Author Is a Language Model

    Typed Domain Grounding (TDG) embeds a DSL inside a mainstream language the LLM already knows (e.g., Kotlin) and uses the host compiler as an oracle. The author describes five building blocks—embedding, choosing a host language with high training‑data frequency, compiler‑driven type safety, a generate‑compile‑repair loop, and an on‑demand teaching tool—and shows measured results from kUML, a Kotli…

    InfoQinfoq.com18 min
  3. Build Hints That Fail Before the Build Server

    Codename One moved 87 common build hints into Java annotations, so misspelled keys or wrong value types cause compile‑time errors instead of silent build‑server ignores. The annotations are processed back into the existing string protocol, keeping backward compatibility while improving validation and IDE support.

    CodeName Onecodenameone.com6 min