~/talk

Upgrading Meta's Kotlin Infrastructure to K2

Talkat droidcon London 2024 · 2024-10-31..11-01· [kotlin]
links:none on file
slides:none on file

Meta upgrades Kotlin front end to K2 across a heavy Buck-based Android toolchain, migrating 95% of models and achieving 20% faster builds on average. Migration requires rewriting compiler plugins to use FIR extensions, adding FIR transformers and declaration generators to modify in-memory IR, and switching KSP to a standalone KSP2 invocation. Challenges include a 20 million line Kotlin codebase, stricter type checks that expose latent bugs, and custom casabi source-only symbol generation.

AI-written summary · about

  1. 0:00Kotlin K2 migration intro
  2. 1:51Why Meta started K2
  3. 6:06K2 migration challenges
  4. 9:47K2 compiler front end
  5. 12:21K2 compiler plugins
  6. 17:26Build speed with K2
  7. 23:38KSP and K2 at Meta
  8. 25:08K2 adoption results
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.