-
Notifications
You must be signed in to change notification settings - Fork 27
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
When codegen fails a backtrace is nice #82
Comments
Maybe in a debug log? |
https://doc.rust-lang.org/std/backtrace/index.html is experimental; blocked on rust-lang/rust#53487 |
Backtrace is no longer experimental in 1.65 |
Also I realized something about this tension (between showing backtraces versus showing the inline errors) and perhaps i commented on this somewhere earlier? But basically the backtraces are useful if you're working on the actual codegen tool itself, but the inline errors are much more useful if you're working on some other table, and just using the tool. |
I think if I add backtraces in a debug log both users are happy? |
I found it very helpful to have
eprintln!("{}", Backtrace::capture());
before places that return syn::Error's when modifying the codegen. Without it the lovely error told me where in the input the problem was but not so much where in the codegen it might be.I wonder if it's worth having that as a standard practice?
The text was updated successfully, but these errors were encountered: