Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce boilerplate with macro bundles #58

Merged
merged 1 commit into from
Sep 17, 2015
Merged

Conversation

philwills
Copy link
Contributor

@philwills
Copy link
Contributor Author

Initially I was trying to add support for 2.10 via macro-compat, but the combination of a significant API change in scala-logging and having no idea how to implement c.internal.enclosingOwner in 2.10 made me bail on that.

@cb372
Copy link
Owner

cb372 commented Sep 17, 2015

Thanks, that's much nicer!

Back in 2.10.x we had access to all kinds of useful stuff like c.enclosingMethod, c.enclosingClass, etc. But in 2.11 they decided that letting macros know too much about their surroundings was bad form and they removed all those methods. I pray that c.internal.enclosingOwner will stick around for a while ...

Here's how it used to work with Scala 2.10.3. https://github.com/cb372/scalacache/blob/0.1.1/core/src/main/scala/cacheable/Macros.scala#L16

cb372 added a commit that referenced this pull request Sep 17, 2015
Reduce boilerplate with macro bundles
@cb372 cb372 merged commit 892269d into cb372:master Sep 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants