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

Replace structopt with clap #177

Closed
tgeoghegan opened this issue May 18, 2022 · 0 comments · Fixed by #486
Closed

Replace structopt with clap #177

tgeoghegan opened this issue May 18, 2022 · 0 comments · Fixed by #486

Comments

@tgeoghegan
Copy link
Contributor

Apparently structopt is in maintenance mode, and we should now be using clap.

tgeoghegan added a commit that referenced this issue Sep 9, 2022
`structopt` has been migrated into `clap`, so we now use `clap::Parser`,
which is virtually a drop-in replacement for `structopt::Structopt`,
using the instructions in `clap`'s handy migration guide[1]. The name
`Structopt` is still exported from `clap`, but it's easy enough to adopt
`clap::Parser` instead. There's no changes except some minor diff in the
help output of binaries. We also add simple tests based on
`clap::App::debug_assert` as suggested in the migration guide.

[1]: https://github.com/clap-rs/clap/blob/v3-master/CHANGELOG.md?plain=1#L584

Resolves #177
tgeoghegan added a commit that referenced this issue Sep 12, 2022
`structopt` has been migrated into `clap`, so we now use `clap::Parser`,
which is virtually a drop-in replacement for `structopt::Structopt`,
using the instructions in `clap`'s handy migration guide[1]. The name
`Structopt` is still exported from `clap`, but it's easy enough to adopt
`clap::Parser` instead. There's no changes except some minor diff in the
help output of binaries. We also add simple tests based on
`clap::App::debug_assert` as suggested in the migration guide.

We also annotate certain sensitive arguments (database passwords and
datastore keys) so that their values from the environment won't be
printed when binaries are run with `--help`.

[1]: https://github.com/clap-rs/clap/blob/v3-master/CHANGELOG.md?plain=1#L584

Resolves #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 a pull request may close this issue.

1 participant