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

Termination #13

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

matthiasbeyer
Copy link

@matthiasbeyer matthiasbeyer commented Sep 6, 2022

Hi!

I rewrote the ExitCode type in this patchset, so not sure whether you like this. This would, of course, need a major version bump for this crate...

But it is necessary to implement std::process::Termination, which I would love to see, because that enables the user of this crate to return an ExitCode directly from main()!

Tell me what you think!

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
@matthiasbeyer
Copy link
Author

I also emailed you because of maintainership of this crate, but the mail bounced. So maybe your mail setup is broken?

@SUPERCILEX
Copy link

SUPERCILEX commented Oct 4, 2022

A better solution would be to make these the stdlib exitcode: https://doc.rust-lang.org/stable/std/process/struct.ExitCode.html. That already implements termination.

Did you figure out a way to contact @benwilber? Maybe we can get the crate ownership transferred?

@SUPERCILEX
Copy link

Actually my thing is bad because then you lose access to the error code as a number (since std ExitCode is opaque). I found https://crates.io/crates/sysexits which is your PR but better because it's an enum.

@matthiasbeyer
Copy link
Author

Did you figure out a way to contact @benwilber? Maybe we can get the crate ownership transferred?

No, I did not get any response from them. When meeting with the CLI WG yesterday we decided that there are other crates like this that are well maintained, for example sysexit but also proc-exit - so there's no need in getting access to this crate and we can consider it abandoned, I guess.

@SUPERCILEX
Copy link

Sounds good. Should https://rust-cli.github.io/book/in-depth/exit-code.html be updated then to recommend sysexit instead? I just migrated: SUPERCILEX/ftzz@8bb420f.

@SUPERCILEX
Copy link

Actually yeah, created rust-cli/book#177

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

Successfully merging this pull request may close these issues.

None yet

2 participants