Annotation macros don't really work in the PC, but that's ok in most cases because generated members are picked up with the code is compiled.
However, even if a macro annotation is not done in the PC, basic functionality like type-at-point is broken for the class with the annotation. The only remedy is to not use macro-paradise (which obviously causes problems for other non-annotation macros that want to use macro-paradise features that maybe do work).
I have a test in https://gitlab.com/fommil/stalactite/blob/master/src/test/scala/stalactite/PresentationCompilerTest.scala which is ignored because it fails. This passes the test if macro-paradise is just not used. We're using the default -Ymacro-expand:discard but I think none also works. I don't think it's doing any work in discard because if I put printlns in the macro they never print. I don't want to use :none because that breaks other macros.
Annotation macros don't really work in the PC, but that's ok in most cases because generated members are picked up with the code is compiled.
However, even if a macro annotation is not done in the PC, basic functionality like type-at-point is broken for the class with the annotation. The only remedy is to not use macro-paradise (which obviously causes problems for other non-annotation macros that want to use macro-paradise features that maybe do work).
I have a test in https://gitlab.com/fommil/stalactite/blob/master/src/test/scala/stalactite/PresentationCompilerTest.scala which is
ignored
because it fails. This passes the test if macro-paradise is just not used. We're using the default-Ymacro-expand:discard
but I thinknone
also works. I don't think it's doing any work indiscard
because if I putprintln
s in the macro they never print. I don't want to use:none
because that breaks other macros.