bug
bug copied to clipboard
Macro annotation doesn't attempt to alert to missing compiler configuration
reproduction steps
Using Scala 2.13.7, omitting -Ymacro-annotations when compiling either the macro or its usage/expandage fails silently to expand.
problem
Since paradise was ingested, the compiler could complain if an annotation with a macroExpand method is compiled without the required compiler configuration.
Inspired by #12498
In which the doc says "aforementioned":
First of all, note the @compileTimeOnly annotation. It is not mandatory, but is recommended to avoid confusion. Macro annotations look like normal annotations to the vanilla Scala compiler, so if you forget to enable the macro paradise plugin in your build, your annotations will silently fail to expand. The @compileTimeOnly annotation makes sure that no reference to the underlying definition is present in the program code after typer, so it will prevent the aforementioned situation from happening.