feat: Unwind with specific type when encountering an unexpected cycle#856
Conversation
✅ Deploy Preview for salsa-rs canceled.
|
CodSpeed Performance ReportMerging #856 will degrade performances by 5.46%Comparing Summary
Benchmarks breakdown
|
0690fcc to
4a7cfdd
Compare
|
This caused cycles in r-a to not print the backtrace or anything, which is quite confusing - is there something we can do to prevent it from just panicking? Why not panic with a string? |
|
Oh, that's what I forgot to do on the rust-analyze side, type cast the payload to this new type 🤦 We can also make this capture a backtrace here fwiw
I am not sure I understand what you mean with this. |
Oh, I realize I was quite unclear - I meant prevent it from just panicking, causing e.g. tests to fail, with nothing printed. |
|
Ah, no, I believe Rust (or well, libtest) doesn't allow you do that. It just catches panic payloads and tries to downcast them to a string. |
|
We could maybe toggle behavior here with an env var? (not a feature flag as that invalidates the build cache) Though I guess unless the default is to panic it wouldn't make a lot of sense either |
Closes #704