~/talk

Kotlin Compiler Plugin - Write your own code transformer without dealing with bytecode

links:none on file
slides:none on file

Facebook prototypes a Kotlin compiler plugin that rewrites annotated methods into inline traceBegin traceEnd with try finally so no bytecode editing is needed and transformed files are written as virtual files into the build folder. Implementation uses a Gradle subplugin to pass options, a command line processor plus ComponentRegistrar, and an analysis handler extension that runs a KT tree visitor to edit source text. Plugin is on GitHub works on modules using the Kotlin compiler but breaks IDE breakpoints and cannot modify third party compiled libraries.

AI-written summary · about

  1. 0:00Introduction
  2. 0:55Why Kotlin Compiler Plugin
  3. 3:25Use Cases for Code Transformation
  4. 5:10Challenges of Writing Plugin
  5. 6:34Gradle Plugin Setup
  6. 8:18Kotlin Gradle Subplugin
  7. 10:22Kotlin Compiler Plugin
  8. 11:48Analysis Handler Extension
  9. 13:57Tree Visitor for Parsing
  10. 16:26Full Transformation Process
  11. 16:46Best Practices and Warnings
  12. 18:36Q&A Session
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.