Why it matters
Compiler plugins power many libraries. Understanding shapes what's possible.
Advertisement
The architecture
Plugin: implements Plugin interface. Hooks into phases.
Load via -Xplugin flag.
Advertisement
How it works end to end
Common plugins: kind-projector (type lambdas), better-monadic-for (for-comprehension improvements), scalafix (linting + refactoring).
Custom plugins: for org-specific transforms.
Scala 3: uses different compiler infrastructure.