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

Wrong report when macro expansion fails #67

Open
Emoun opened this issue Nov 3, 2021 · 0 comments
Open

Wrong report when macro expansion fails #67

Emoun opened this issue Nov 3, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Emoun
Copy link
Contributor

Emoun commented Nov 3, 2021

For all macrotest::expand variants, if the macro being expanded panics, the report gives wrong or confusing errors.

First, if you have no .expanded file and not using expand_without_refresh, the call will succeed (even though the expanded macro panicked) and create an empty .expanded file. If you are using expand_without_refresh the report will correctly show an error however will give no indication about what happened.

If you do have an .expanded file the report will give a <file-path> - different! error, and show the contents of your expanded file but nothing else.

For all of these cases, I would expect the error message to tell me that the macro expansion failed and maybe show me the error message it failed with.

Note: I found these cases while testing #66, however, these problems are also present in v1.0.8.

@eupn eupn self-assigned this Nov 4, 2021
@eupn eupn added the bug Something isn't working label Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants