Open
Description
reproduction steps
Main example:
using Scala 2.13.5, if you use any macro logging function in a macro, e.g.
class EmitMsg[T] {}
object EmitMsg {
implicit def emit[A]: EmitMsg[A] = macro Macros.emit[A]
final class Macros(val c: whitebox.Context) {
def emit[A: c.WeakTypeTag]: c.Tree = {
c.abort(c.enclosingPosition, "ERROR!")
}
}
}
The logging will only be triggered if the macro function (in this case EmitMsg.emit) was called directly, if it is called as part of an implicit macros pattern (https://docs.scala-lang.org/overviews/macros/implicits.html), it will be ignored. Namely, all error message degrades to "implicit not found" message, and all info & warning message won't be logged or displayed anywhere.
problem
Give the ubiquity of implicit macros pattern, this issue may seriously degrade the capability of macro system.
This issue is also blocking my PR for singleton-ops: