Closed
Description
EDIT: Adding bug description here at the top now that we know more about it, and since lots of people are hitting this:
- error only occurs when compiling on Java 9 or 10. running on Java 9 or 10 is fine
- any code that calls macros is affected. doesn't matter what the macro is
- error message is usually "macro implementation not found"
- but see akka-http ScalatestRouteTest example doesn't compile after update to 2.12.5 bug#10800 (comment) for an example of how a different error message can result instead
- there is no workaround. you must compile on Java 8 or wait for 2.12.6
- 2.12.6 status thread: https://contributors.scala-lang.org/t/scala-2-12-6-coming-soon/1729
====
original report follows:
on Java 9 https://gist.github.com/SethTisue/0681f6aa70662ecde47a4a842ed13fb6 gives
[info] Compiling 1 Scala source to /Users/tisue/tmp/20180320/target/scala-2.12/classes ...
[error] /Users/tisue/tmp/20180320/S.scala:5:4: macro implementation not found: macroTransform
[error] (the most common reason for that is that you cannot use macro implementations in the same compilation run that defines them)
[error] @newtype case class WidgetId(toInt: Int)
[error] ^