~/talk

Writing a Kotlin Compiler Plugin

slides:none on file

Shows how to build a real Kotlin compiler plugin from JetBrains’ compiler-plugin-template with three modules (annotations, compiler, Gradle hook), hooks into FIR and IR extensions, and implements concrete features: a diagnostic checker that flags unsafe use of check/require, an @Log annotation that injects print statements at function entry/exit (parameters and return), test validation using generated .fir/.ir text files and the compiler devkit, and Gradle/compiler options for toggling behavior.

AI-written summary · about

  1. 0:00Kotlin compiler plugins intro
  2. 1:03What is metaprogramming and its uses
  3. 3:36Compiler plugins vs annotation processing
  4. 7:27Kotlin compiler history
  5. 9:37Kotlin compiler internals
  6. 13:29Kotlin plugin project setup
  7. 15:18Plugin entry point and hooks
  8. 17:02Diagnostics in plugins
  9. 23:04IR code modification
  10. 28:04Code generation in plugins
  11. 29:09Testing compiler plugins
  12. 33:00Gradle integration
  13. 34:25Debugging plugins
  14. 34:46Notable open-source plugins
  15. 36:13Q&A
~/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.