scala/scala — pull request #3287 by retronym (2013-12-18 16:27:07+00:00)
Title: Presentation compiler friendliness for macros

- Retain macro expansion in the tree in the presentation compiler
under a new setting -Ymacro-expand:discard.
- Deprecate -Ymacro-no-expand, in favour of -Ymacro-expand:none
- Prevent range position validation errors in macro expansions (even
though the preceding change means they no longer impact the IDE.)

I trialled the "discard-the-macro-expansion" approach recently in
scala-async (it can actually all be driven from a suitably ambitious
macro), and the results in the IDE were pleasing: hyperlinking works
as expected.

Future work: Add `-Ymacro-expand:discard-whitebox-only` to avoid expanding
blackbox macros altogether. This would be handy when troubleshooting
performance problems in the IDE.