Integrating IDEs with Dotty the experimental Scala compiler
summary
Dotty exposes the typed ASTs (TASTy) so the IDE queries the compiler after typechecking to implement features like go-to-definition and rename; the interactive API that manages compilers and queries is under 1,000 lines and powers completion and navigation. A language server implements LSP in a few hundred lines and connects to VS Code via an SBT plugin that generates project JSON; debugging reuses the Java debug server and evaluates expressions by compiling them into a static method and loading it into the debug VM, though captured variables in transformed inner methods remain a known limitation. uses TASTy trees interactive API <1000 lines LSP server ~few hundred lines
AI-written summary · about
chapters (19)
- 0:00Intro
- 0:40A CHANCE TO REDESIGN COMPONENTS
- 1:34STATE OF THE ART
- 2:28DESIGN PRINCIPLES
- 4:49SOURCE CODE
- 5:20TREE AFTER TYPECHECKING
- 6:53QUERYING THE COMPILER
- 12:54THE IDE PORTABILITY PROBLEM
- 15:48IMPLEMENTING THE DOTTY LANGUAGE SERVER
- 18:37SBT INTEGRATION
- 19:08CONFIGURATION FILES
- 20:29BUILD SERVER PROTOCOL
- 23:29EXPRESSION EVALUATION
- 24:19RUN THE COMPILER PIPEUNE
- 24:46EXTRACT TO A STATIC METHOD
- 25:49ON THE DEBUGGING VM
- 34:05FUTURE WORK
- 35:20CONCLUSION
- 37:19QUESTIONS ?








