Now that the roadmap for non-experimental Scala macros is open http://scala-lang.org/blog/2017/10/09/scalamacros.html, we eventually need to migrate existing projects that depend on black-box def macros at least for Scala 2.14 according to the current plan.
Migration is always a pain (as we’ve already seen that in migration from sbt-0.13 to sbt-1.0, but it’s done successfully). However, if we aware of necessary changes and missing features in the upcoming macros before the migration, I believe it can mitigate the pain.
So I’d like to create a list of Scala projects that are extensively using Scala Macros, especially black-box def macros. I hope this kind of list will be useful to collect use-cases and find essential macro features for these projects.
Projects using Scala black-box def macros:
- Airframe https://github.com/wvlet/airframe
- Airframe embeds source code location to logging, extracts class parameters, and generates codes for injecting classes.
- For more details, see how Airframe uses Macros http://wvlet.org/airframe/docs/internals.html
- macwire implements compile-time dependency injection with Scala macros https://github.com/adamw/macwire
- Play JSON extracts type information (case class names and types for mapping JSON and case classes) https://github.com/playframework/play-json
- Shapeless https://github.com/milessabin/shapeless (mostly whitebox macro usage)
- and more…
I think we should maintain this list in a wiki or some file in https://github.com/scalacenter/macros.
cc: @olafurpg