Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upnew trace_macros doesn't work if there's an error during expansion #43493
Comments
This comment has been minimized.
This comment has been minimized.
|
Nominating for prioritization. Seems good to fix since this is very painful for macro authors. |
nikomatsakis
removed
the
P-high
label
Jul 27, 2017
This comment has been minimized.
This comment has been minimized.
rust-highfive
added
P-medium
and removed
I-nominated
labels
Jul 27, 2017
jseyfried
self-assigned this
Jul 27, 2017
This comment has been minimized.
This comment has been minimized.
|
I think the output provided by #41520/#42103 is fine (modulo the verbosity issue #42223). It just needs to show up even when expansion doesn't finish due to an error. Something like this:
This is probably also the issue in #42170. |
This comment has been minimized.
This comment has been minimized.
|
This underlying issue here is that macro errors cause aborts way too much. For a quick fix, we could make sure we always call |
Mark-Simulacrum
referenced this issue
Jul 27, 2017
Closed
`trace_macros` no longer shows up after hitting the recursion limit #42710
This comment has been minimized.
This comment has been minimized.
|
I think that @jseyfried's solution would be correct one. |
bjorn3
added a commit
to bjorn3/rust
that referenced
this issue
Aug 25, 2017
bjorn3
referenced this issue
Aug 25, 2017
Merged
Fix "new trace_macros doesn't work if there's an error during expansion" #44088
TimNN
added a commit
to TimNN/rust
that referenced
this issue
Sep 17, 2017
TimNN
added a commit
to TimNN/rust
that referenced
this issue
Sep 17, 2017
TimNN
added a commit
to TimNN/rust
that referenced
this issue
Sep 17, 2017
bors
closed this
in
#44088
Sep 17, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
durka commentedJul 26, 2017
•
edited
The new trace_macros has much better output, but it has regressed in functionality! The old trace_macros could be used to debug macro expansion. Example using rustc 1.6.0:
OK, you can see
m!(foo)was invoked, and then it didn't match so there's an error.Now with current rustc (all channels):
You no longer get to see the chain of expansions leading up to the error. This typically occurs much deeper in a string of recursive macros, making debugging much harder.
cc #41520 @estebank @nikomatsakis