Skip to content

Add macro error reporting #6024

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

Conversation

nicolasstucki
Copy link
Contributor

@nicolasstucki nicolasstucki commented Mar 5, 2019

No description provided.

@nicolasstucki nicolasstucki force-pushed the add-macro-error-reporting branch from 34565ff to 37994e9 Compare March 7, 2019 14:06
@nicolasstucki nicolasstucki marked this pull request as ready for review March 7, 2019 14:07
@nicolasstucki nicolasstucki requested a review from liufengyun March 7, 2019 14:07
Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

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

LGTM

For later: enrich QuoteError (rename to ExpansionError?) with positions, so that in some cases, error will just stop macro expansion and display the errors at the precise place.

@biboudis
Copy link
Contributor

biboudis commented Mar 7, 2019

@liufengyun related to the change in Splicer here https://github.com/lampepfl/dotty/pull/5822/files#diff-43be0f2f8a9625bb70763569c65a6fdcR49

@nicolasstucki
Copy link
Contributor Author

What @liufengyun is describing is exactly what @biboudis is doing. The difference between reflect and quote errors is that reflect will take a position and quote will take an expression (i.e. one of the arguments) for which the position is taken.

@nicolasstucki nicolasstucki merged commit 7d30a83 into scala:master Mar 7, 2019
@nicolasstucki nicolasstucki deleted the add-macro-error-reporting branch March 7, 2019 17:03
@ghost ghost removed the stat:needs review label Mar 7, 2019
@smarter
Copy link
Member

smarter commented Mar 7, 2019

@nicolasstucki
Copy link
Contributor Author

It conflicted with the white box macros which will stop expanding macros after the first failed expansion. I will fix it first thing in the morning.

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.

4 participants