Explore the intricacies of developing testable compiler plugins in Scala 3 through this comprehensive conference talk from Scala Days 2023 Seattle. Dive into the new compiler architecture and metaprogramming capabilities of Scala 3, learning how to extend the core language functionality. Discover useful utilities in the dotty compiler codebase for analyzing and modifying trees and contexts. Gain insights on integrating the compiler into test fixtures and learn about valuable tools such as a giter8 template, an sbt plugin for exposing compiler plugins to munit tests, and a new snapshot testing library for regression protection. Follow along as the speaker demonstrates how to write and test a compiler plugin from scratch, covering topics like programs as data, compiler plugin creation, Scala phases, and implementing transforms. This talk is ideal for developers looking to enhance their understanding of Scala 3's advanced features and compiler plugin development techniques.
Overview
Syllabus
Intro
Programs are Data
What is a Compiler Plugin?
Creating a compiler plugin
The scala phases
Testing a compiler plugin.
Attribution for technique
Implementing a transform.
Snapshot Testing
Taught by
Scala Days Conferences