-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Description
TL;DR: I'm annoyed about note: this error originates in a macro outside of the current crate and want a way to turn it off and get back the error backtrace that tells me where the problem is.
I separated some of my utility code and macros into a utils crate for faster compile times. In this error, I have a macro in there rpc!, which invokes another macro, guilty!. This requires the crate that invokes rpc! to also import the crate that defines guilty!, but I forgot to do that. However, the error message gives me no way to find that out because it doesn't show where the error actually occurs within the rpc! macro:
error: macro undefined: 'guilty!'
--> crates/back/flow/src/lib.rs:374:17
|
374 | assert!(rpc!(tx, CmdFrom::Start, service.clone(), data.clone()).unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this error originates in a macro outside of the current crate
In this case I wrote all the crates in question. But even if I didn't, and I were going to submit a bug to the author of rpc!, there's no useful information in this error message. Can there be a way to get back the error information, either by a compiler switch or using cargo's workspace feature or something?