Interest in collaboration with human-panic?
This seems to set out to have a similar goal to human-panic. I'm curious if there is any collaboration we can foster between these crates or if there are reasons to keep these separate.
See https://crates.io/crates/human-panic
Hi @epage! Thank you for your message.
I knew the human-panic crate before creating bugreport and definitely didn't want to start a competing project. To be honest, I don't see a huge overlap in functionality, but maybe I'm mistaken!
From what I understand, human-panic only comes into play if there is an actual (unexpected) crash of a program through panic!.
On the other hand, bugreport-code is intended to be executed on purpose by a user if they want to report a bug (which might not involve a program crash at all).
What both crates have in common is the need to collect some information about the program in question (and it's environment). If you see a potential collaboration on this front (or any other front), please let me know!
Oh, from the summary, I missed that it was user-driven (since I only did a quick glance at the example).
I'm assuming the use cases and users line up enough that one crate could serve both needs, with a hook-install function and a dump-report function.
If it doesn't, I can see having each crate advertise the other! We've been doing that with other CLI related crates (e.g. assert_cmd) to try to improve discovery within the ecosystem. I could also see adding this to the CLI book.
I'm assuming the use cases and users line up enough that one crate could serve both needs, with a hook-install function and a dump-report function.
Speaking in terms of mathematical relations, would you see the current bugreport functionality as a subset of the human-panic functionality? Or the other way around? I think I do see some overlap, but both crates also come with functionality that users of the other crate might not need. But again, I'm happy if that's not the case.
If it doesn't, I can see having each crate advertise the other!
Absolutely. Let's do that right now: 456eb0dc57d1d278f5289f831faf7c2fa361eeb8
We've been doing that with other CLI related crates (e.g. assert_cmd) to try to improve discovery within the ecosystem
By the way: I LOVE assert_cmd! I use it for integration tests in most of my Rust CLI programs. The only reason I haven't contributed to the project is that it already fits my needs perfectly :smile:
Speaking in terms of mathematical relations, would you see the current bugreport functionality as a subset of the human-panic functionality? Or the other way around? I think I do see some overlap, but both crates also come with functionality that users of the other crate might not need. But again, I'm happy if that's not the case.
I assume they would benefit from each others information gathering with the differences beyond that being
- human-panic also gathering the call stack
- Each having an output format tailored to its use case
My hope in having them together include
- Improving human panic with ideas from here, like env gathering
- Allow shared initialization of the gathered information, rather than having distinct APIs that developers have to duplicate their initialization with (like env vars)
- Encourage devs to include both to improve supportability
I very well could be missing something in this.
Thank you for clarifying. I am very open to the ideas proposed, but I'd like to be honest: I probably won't spend too much time on this myself.