Skip to content
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

Interest in collaboration with human-panic? #9

Open
epage opened this issue Aug 2, 2021 · 5 comments
Open

Interest in collaboration with human-panic? #9

epage opened this issue Aug 2, 2021 · 5 comments

Comments

@epage
Copy link

epage commented Aug 2, 2021

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

@sharkdp
Copy link
Owner

sharkdp commented Aug 2, 2021

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!

@epage
Copy link
Author

epage commented Aug 2, 2021

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.

@sharkdp
Copy link
Owner

sharkdp commented Aug 8, 2021

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: 456eb0d

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 😄

@epage
Copy link
Author

epage commented Aug 9, 2021

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.

@sharkdp
Copy link
Owner

sharkdp commented Aug 22, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants