Skip to content

@compileTimeOnly for macro annotations #414

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

Merged
merged 1 commit into from
Feb 27, 2015
Merged

@compileTimeOnly for macro annotations #414

merged 1 commit into from
Feb 27, 2015

Conversation

xeno-by
Copy link
Contributor

@xeno-by xeno-by commented Feb 27, 2015

No description provided.

First of all, note the `@compileTimeOnly` annotation. It is not mandatory, but is recommended to avoid confusion.
Macro annotations look like normal annotations to the vanilla Scala compiler, so if you forget to enable the macro paradise
plugin in your build, your annotations will silently fail to expand. The `@compileTimeOnly` annotation makes sure that
no references to the underlying definition is present in the program code after typer, so it will prevent the aforementioned

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change "definition is present" to "definition are present".

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or better still, to prefer the singular, change "sure that no references to the underlying definition is present" to "sure that no reference to the underlying definition is present" (delete the s from references).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Is the change otherwise LGTY?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that looks great!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I'll merge then.

xeno-by added a commit that referenced this pull request Feb 27, 2015
@compileTimeOnly for macro annotations
@xeno-by xeno-by merged commit c4ca1d3 into scala:master Feb 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants