scala-3-migration-guide icon indicating copy to clipboard operation
scala-3-migration-guide copied to clipboard

Document alternatives to macro annotations

Open jto opened this issue 4 years ago • 2 comments

Scala 3 won't support macro annotation, which will break a number of open-source libraries.

AFAIK there is no "official" documented alternative and the only solution currently being tested by the community is to generate code using Scalafix (see simulacrum-scalafix).

The migration guide should offer alternatives to macro annotations.

jto avatar Jul 01 '20 13:07 jto

I think you are right there is no alternative in Dotty for macro annotation.

Thank you for pointing us to simulacrum-scalafix! I will take a closer look at it.

adpi2 avatar Jul 01 '20 13:07 adpi2

Alternatives can be:

  • type class derivation
  • dotty compiler plugin (example, doc)
  • scalafix

adpi2 avatar Sep 24 '20 09:09 adpi2