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

Migrate to clap 3.0.0 #183

Open
robinkrahl opened this issue Dec 9, 2021 · 2 comments
Open

Migrate to clap 3.0.0 #183

robinkrahl opened this issue Dec 9, 2021 · 2 comments

Comments

@robinkrahl
Copy link
Collaborator

Finally, the first release candidate for clap 3.0.0 is available. structopt will not be updated for clap 3.0.0 (TeXitoi/structopt#516), so it will not receive any new features, and we were having some issues (at least #114) that should be fixed in clap 3.0.0. Therefore I think we should consider migrating to clap 3.0.0. I suggest the following migration steps:

  1. add snapshot tests for the --help output of all subcommands and for the --version output
  2. prepare a patch that migrates from structopt to clap 3.0.0-rc.1
  3. compare compile time and binary sizes and decide whether we want to go forward with the migration

Thoughts?

(Looking at the benchmarks, we should expect a small binary size increase, but at least improvements are planned.)

@d-e-s-o
Copy link
Owner

d-e-s-o commented Dec 10, 2021

Thanks for bringing up this topic. Indeed, just saw the release today. Can you please clarify what you are referring to by snapshot tests? I assume some golden-output comparison of sorts? Other than that question what you propose sounds like a good plan to me.

@robinkrahl
Copy link
Collaborator Author

Can you please clarify what you are referring to by snapshot tests?

Basically comparing the output to some expected value read from a text file. insta is a useful framework for such tests. Of course this is not meant to be prescriptive, but as a means to assess the changes and to detect unintended behavior.

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