Open-Source Wikis

/

Kotlin

/

Lore

JetBrains/kotlin

Lore

The git history of this repository starts in October 2008 with an initial contribution and continues through nearly two decades of compiler engineering. The story is unusually well preserved: nearly all major Kotlin features can be traced through the commit log, and the repository still contains the original 2008 directory layout under heavy modernization.

This page tells the story chronologically and calls out the longest-standing pieces, the deprecated ones, and the major rewrites.

Eras

The pre-public era (Oct 2008 – Jul 2011)

  • Oct 2008 — initial commit lands. The project is internal to JetBrains.
  • 2010 — first 100 public-ish commits. Active design phase.
  • Jul 2011 — Kotlin is publicly announced at JVM Language Summit. Commit volume jumps from a few hundred per year to thousands.

The K1 buildout (Jul 2011 – Feb 2016)

  • The original frontend (later called K1, "FE 1.0") and JVM backend take shape under compiler/frontend/ and what is now compiler/backend/.
  • The standard library, kotlin-reflect, the Maven plugin, and the JPS integration are all written in this period (most live in libraries/ and jps/).
  • 2012 — sustained 6,000+ commits/year. The project rapidly expands across stdlib, IDE plugin (in a separate repo), and JS support.
  • Feb 2016 — Kotlin 1.0 ships. The promise of source/binary backward compatibility starts here, and the K1 frontend is the canonical implementation.

The Native and Multiplatform era (2017 – 2019)

  • 2017 — Kotlin/Native (LLVM-based) takes root. The kotlin-native/ directory is added with a runtime in C/C++ and a compiler backend in Kotlin. Annual commit volume climbs above 9,500.
  • 2018 — Kotlin Multiplatform projects become a first-class feature in KGP (libraries/tools/kotlin-gradle-plugin/).
  • 2019 — work on FIR (the K2 frontend) begins in earnest. The compiler/fir/ directory is established. By the end of the year the project is fielding 10,000+ commits/year.

The IR unification (2019 – 2021)

  • A new backend IR (compiler/ir/ir.tree/) is introduced as the shared lowering and code-generation substrate for JVM, JS, Native, and Wasm.
  • The JVM IR backend in compiler/ir/backend.jvm/ replaces the older direct-from-PSI bytecode generator. Its rollout is gradual (opt-in for several Kotlin versions).
  • The JS IR backend in compiler/ir/backend.js/ replaces the legacy JS backend in js/js.translator/ (the legacy translator is retained but eventually deprecated).
  • Mar 2020 — peak commit year (~13,000). Pandemic-era development plus the IR migration drive the volume.

The K2 / Analysis API era (2021 – mid-2024)

  • The Analysis API (analysis/analysis-api*/) is built up as the IDE-facing surface over FIR. The Ka* type prefix arrives.
  • The fir2ir translator (compiler/fir/fir2ir/) wires K2 into the existing backend IR, so K2 can target every backend without needing to ship its own backend.
  • WebAssembly support lands as a full backend (compiler/ir/backend.wasm/, wasm/wasm.ir, wasm/wasm.tests).
  • 2023 — commit volume rebounds to 10,400 after a quieter 2022.
  • May 2024 — Kotlin 2.0 ships with K2 as the default frontend. K1 remains in the tree for the IDE plugin's compatibility window.

The Build Tools API era (2024 – present)

  • A stable in-process compiler API, the Build Tools API, is added under compiler/build-tools/kotlin-build-tools-api/. KGP, Maven, and others migrate to use it.
  • 90-day churn data (Apr 2026) shows BTAPI files among the top-modified files in the repo, indicating sustained iteration.
  • Compose multiplatform plugin (plugins/compose/) keeps pace with Compose Compiler releases.
  • The K1 frontend remains in the tree but is in long-term retirement mode — most new work targets K2 or shared IR.

Longest-standing features

The following code paths have been continuously maintained for more than a decade:

Feature First introduced Notes
compiler/psi/ (PSI parser, KtFile, KtClass, ...) 2010–2011 Still the entry point for both K1 and the raw FIR builder. The grammar definition has barely changed.
compiler/frontend/ (K1) 2010–2011 Refactored countless times but never replaced; still used for legacy paths and a parallel implementation of the Analysis API (analysis-api-fe10/).
core/descriptors/ 2011–2012 The K1 declaration model. Survived even as K2/FIR introduced symbols.
libraries/stdlib/common/ 2011–2012 The common stdlib has accumulated APIs but never been wholesale rewritten.
compiler/cli/ 2011 The kotlinc entry point. The argument layer (compiler/arguments/) was modernized but the CLI shape is original.
compiler/daemon/ 2014 The compile daemon protocol has evolved but the basic architecture is unchanged.

Major rewrites

Rewrite When What changed
JVM bytecode generator → JVM IR backend 2019–2021 compiler/backend.jvm/ (descriptor-driven) gave way to compiler/ir/backend.jvm/ (IR-driven). The legacy backend is retained for compatibility.
JS legacy translator → JS IR backend 2019–2022 js/js.translator/ continues to exist, but compiler/ir/backend.js/ is the modern path that produces output via klibs and IR lowering.
K1 frontend → K2 / FIR 2019–2024 The defining rewrite of this era. K1 lives on but K2 is the default. Both share the backend IR.
Frontend descriptors → FIR symbols 2019–2024 Inside the K2 path, descriptors give way to FIR symbols. The Analysis API's Ka* types live atop symbols.
Direct in-process compilation → Build Tools API 2023–present Build tools (KGP, Maven plugin, JPS) migrate from talking to private compiler internals to a stable API. Visible in the churn data on compiler/build-tools/.

Deprecated features

  • K1 / FE 1.0 — still in the tree, still maintained, but no longer the default. New language-level features land in K2 only.
  • JS legacy backend (js/js.translator/) — superseded by the JS IR backend; kept for compatibility.
  • JVM legacy backend (compiler/backend.jvm/ outside the IR module) — superseded by the JVM IR backend.
  • kapt 3 (legacy stub generator)plugins/kapt/ continues to be developed (kapt 4 / FIR-based path), with the older path retained.
  • The dukat/ module (TypeScript declaration file conversion) under libraries/tools/dukat/ is in maintenance mode.

Growth trajectory

  • 2010 — 100 commits, single-digit contributors.
  • 2012 — 6,600 commits, dozens of contributors. Public release in 2011 changed the contributor profile permanently.
  • 2017 — Native added. New top-level directories kotlin-native/ and native/ appear.
  • 2019–2024 — FIR (K2) brings a new sub-tree (compiler/fir/) and the Analysis API a whole new top-level directory (analysis/).
  • 2026 — over 136,000 commits, about a dozen top-level directories under continuous development, and over 60,000 Kotlin source files in the tree. The codebase shows no sign of slowing.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Lore – Kotlin wiki | Factory