What is macro-compat
summary
Macro-compat lets code written against the newer Scala macro APIs (2.11/2.12 macro bundles, untyped trees, freshName, symbolOf) compile on Scala 2.10 by rewriting bundles into object-style macros and inserting compatibility shims. Use it by adding the macro-compat artifact plus macro-paradise and annotate with @bundle; the plugin boxes trees into expressions and unboxes expressions to trees, forwards renamed APIs, and keeps binary stability via MiMa so a single codebase supports multiple Scala versions.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 0:30Outline
- 1:01Who am I
- 1:20Macros
- 2:17Scala macros
- 3:40API changes
- 5:05Macro bundles
- 6:19Untyped trees
- 7:03Different versions
- 9:14Overview
- 10:44Add to build
- 11:42How does it work
- 13:07Conclusion








