How does Incremental Compilation Work with Scala 3
summary
Explains how Scala 3 kept the Scala 2 incremental compiler and adapts it via a compiler bridge and new API/dependency phases to support features like inline and TASTy; describes Scala 3 uses the same incremental compiler as Scala 2 and how zinc name-hashing and API stamps drive correctness and fast invalidation; measures pipelining on real projects, reporting pipelining reduces build times by ~20–33% (e.g., leeches 72s→55s) while increasing memory use, and shows a two‑phase compile gave ~34% win on the Dotty compiler.
AI-written summary · about
chapters (27)
- 0:00Introduction
- 1:06About Jamie Thompson
- 2:04Premature Optimization
- 3:14Scala CLI
- 4:35Scala Compiler
- 5:59Separate Compilation
- 7:49Two Rules
- 8:31Zinc
- 12:59Analysis
- 17:45Challenges
- 19:02Inline Methods
- 20:45Multiproject builds
- 22:20Scala modules
- 22:44How does this split up make your code faster
- 23:02Multithreading
- 24:16Pipeline builds
- 26:04How does it work
- 27:31Early Output Jar
- 28:20Pipelining
- 28:54leeches
- 30:12other projects
- 30:49project layout
- 31:10perfect scenario
- 31:35super duper optimization
- 33:06summary
- 33:28twopass compilation
- 34:32Benchmark








