Day 3 -

June 7th

Track 1 (Olympic Room)

13:30 - 14:15

Testable Compiler Plugin Development in Scala 3

Scala 3 has a new compiler architecture, and excellent metaprogramming capabilities. As of Jan 12th, 2023, you can even add new classes and objects with macros. But what if you want to add more capabilities to the core language? This talk will show you how to write and test a compiler plugin from scratch in Scala 3.

We’ll discuss useful utilities in the dotty compiler codebase for analyzing and modifying trees and contexts. We’ll also show how to wire the compiler into test fixtures, and unveil a giter8 template, an sbt plugin to expose your compiler plugin and the compiler to munit tests, a library containing munit testing fixtures and assertions for compiler plugin development and a new snapshot testing library that is useful for protecting against regressions in your compiler plugins.

Jack Viers

Xebia Functional

Polyglot developer with a passion for delivering safe, performant, domain-focused and ergonomic solutions that scale to fit the needs of users and developers. I love type-systems, domain modeling, streaming data processing, messaging systems, containers, automation, build-tools, and robotics.

Currently, my FOSS work is focused on bringing direct-style legible effects based on continuations to Scala as a provably equivalent alternative to the more difficult to understand monadic effect system status quo in that language.

I’ve worked in PHP, Python, .NET, Java, Scala, JS, TS, and Flash/Flex in domains ranging from broadcast media to agriculture to finance, and in startups and massive corporations. Outside of work I enjoy dancing, growing things in my garden, and hanging out with my family and friends.


Join our conference

Subscribe and follow @ScalaDays on Twitter for the latest conference updates.