PRETTY LITTLE COMPILERS
summary
An SBT plugin is built to read a git-tracked asyncAPI/schema repo and generate Scala ADTs, JSON codecs and ScalaCheck generators; proof-of-concept appears in two weeks and the finished tool in about six weeks. CI-run round-trip property tests serialize production objects to schema objects and back both ways, surfacing typos and mismatches until schemas and code converge. Code generation uses recursion-schemes and contravariant printer combinators to emit source; the workflow eliminates sync delays so teams produce interoperable code minutes after agreeing a schema.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 1:47Outdated schemas problem
- 3:10Internal APIs need contracts
- 4:34Schema compiler defined
- 6:03Recursion schemes
- 8:10Contravariant functor examples
- 13:33Implementation story
- 16:02SBT plugin proof
- 18:55From POC to production
- 19:59Code generators
- 24:10Contravariant functor challenges
- 28:48Key takeaways
- 30:11Q&A
related talks
32mTestable Compiler Plugin Development in Scala 3
31m5 Things you Need to Know About Scala Compilation
44mMetaprogramming 2.0
21mReasonable Scala Compiler
40mIntegrating IDEs with Dotty the experimental Scala compiler
45mFuture proofing Scala the TASTY intermediate rep
38mGenerative Programming and Verification
01h 09mCompilers are Databases
