10

Is this limitation going to be overcome in the future? Or is there some way to get around this that I'm not aware of?

Right now I have a project where I would like to use macros, but they would need to depend on types specific to that project. Having a separate compilation unit for the macro would require me to introduce another one to hold the common types, which I'm not willing to do every time I write a macro.

Duarte Nunes
  • 852
  • 7
  • 16

2 Answers2

8

Yes, we recognize that as a problem. Getting rid of this limitation is very high on our priority list.

Eugene Burmako
  • 13,028
  • 1
  • 46
  • 59
  • 1
    Will make it to 2.11? – Duarte Nunes Feb 25 '14 at 12:10
  • 3
    Definitely not in 2.11.0, which is probably going to be released quite soon. 2.11.x is also very unlikely, maybe with some sort of a plugin, but it's too early to tell. – Eugene Burmako Feb 25 '14 at 14:38
  • At flatMap 2015, I gave a workshop with one of the demonstrations showing our new macro engine built within the scala.meta project. We've made a lot of progress with scala.meta, but it's still not even alpha, so it's hard to predict when/how it'll become part of the standard distribution. We expect to release a beta version next year, and in the meanwhile you could take a look at the demo from flatMap here: https://github.com/scalameta/flatmap2015. – Eugene Burmako May 08 '15 at 11:24
0

Both Scala IDE and Scalor Maven Plugin support same-project macro compilation scopes.

Andrei Pozolotin
  • 897
  • 3
  • 14
  • 21