scalamacros / paradise

(No longer actively maintained.)
http://scalamacros.org/
BSD 3-Clause "New" or "Revised" License
158 stars 53 forks source link

option to ignore (not even strip) annotation macros in the PC #105

Closed fommil closed 6 years ago

fommil commented 7 years ago

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.

fommil commented 6 years ago

It seems that monocle prefers to have macro-paradise enabled in the PC, but simulacrum does not.

It would be good to get to the bottom of why and have one mode enabled but the other disabled.