~/talk

Metaprogramming with Kotlin Symbol Processing

Talkat droidcon New York 2025 · 2025-06-25..06-26· [kotlin]
slides:none on file

Builds a small code generator that scans classes annotated with Tag annotation, derives each class name with the KSP resolver, and emits one file of extension properties using KotlinPoet and the KSP code generator. The pipeline uses an annotation module plus a compiler module (registered via the provider resource), sets retention to SOURCE, filters KSClassDeclarations, and writes files with addOriginatingKSFile so incremental recompiles work. Emphasizes KSP’s determinism versus LLMs and shows a working Tagger symbol processor that reliably generates tag properties.

AI-written summary · about

  1. 0:00Metaprogramming introduction
  2. 1:12What is metaprogramming
  3. 2:37Metaprogramming history
  4. 4:47Annotation processing evolution
  5. 6:16KSP with logger tags
  6. 8:24Setup KSP with modules
  7. 9:49Define tag annotation
  8. 10:51Create KSP processor provider
  9. 11:56Implement KSP processor
  10. 13:21Find annotated classes
  11. 14:23Generate code with Poet
  12. 16:10Build extension property
  13. 17:31Handling rounds and results
  14. 18:35Write generated code
  15. 19:58Generated code usage
  16. 20:39AI versus traditional metaprogramming
  17. 22:04Advantages of traditional metaprogramming
  18. 22:49AI metaprogramming benefits
  19. 24:14When to write metaprogramming tool
  20. 25:42Risks of metaprogramming tools
  21. 26:46Resources and closing
~/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.