fix: panic caused by defmt forwarding#46
fix: panic caused by defmt forwarding#46optlink wants to merge 1 commit intorust-embedded:masterfrom
Conversation
|
We talked about this at the REWG meeting today. First, sincere apologies for being so slow to act on this. It really slipped through the cracks. Is this panic still reproducible or has it been fixed in defmt since? The patch certainly looks fine and we'll take it unless it's now redundant. Thanks for looking into this! |
|
I will be revisiting the project where I am using nb in March so I'll have a chance to reproduce it then. Though based on the comments and documentation in the linked issue it seems like this is intended behavior for defmt and so the patch is still required. |
|
This bug is still reproducible. I struggled to trigger it at first, because this works just fine: However, if I don't implement This panics in I can also confirm that this PR fixes the issue, at least for the case mentioned above. To me, this looks like an issue that should be solved in defmt, as it is easy to accidentally use the defmt API in a way triggering this panic. However, I have no idea how to fix that in defmt or if it is even possible without a breaking change. So even if this PR is only a workaround, it is one that doesn't hurt at all, so we should apply it. |
jannic
left a comment
There was a problem hiding this comment.
LGTM. The issue reported by the CI pipeline is already fixed on the master branch so the PR only needs to be rebased.
|
Rebased |
This is a particularly nasty issue that I spent several days tracking down. See knurling-rs/defmt#723 for another example.