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

Update clap and remove use of structopt in tools #3228

Merged
merged 4 commits into from
Jul 6, 2023

Conversation

stmcginnis
Copy link
Contributor

@stmcginnis stmcginnis commented Jun 26, 2023

Issue number:

Related #2373

Description of changes:

This updates our tools/ binaries to use the latest version of the clap crate. It also drops the use of structopt as that project is now in maintenance mode:

As clap v3 is now out, and the structopt features are integrated into (almost as-is), structopt is now in maintenance mode: no new feature will be added.

So this standardizes our out-of-distro tools to just use the latest clap.

Note: unfortunately we need to pull in two different versions of clap due to our use of generate-readme. That project is no longer maintained as well, so we will either need to find a replacement or stop using it to generate README files.

Testing done:

Built all binaries. Compared $bin --help output between the old and new versions to verify there were no non-aesthetic differences.

Ran cargo make && cargo make ami to make sure project could still be built and published.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@jpculp jpculp requested a review from ecpullen June 26, 2023 15:34
tools/infrasys/src/main.rs Outdated Show resolved Hide resolved
tools/infrasys/src/main.rs Show resolved Hide resolved
tools/pubsys-setup/src/main.rs Show resolved Hide resolved
tools/pubsys/src/aws/publish_ami/mod.rs Show resolved Hide resolved
tools/pubsys/src/aws/validate_ami/mod.rs Show resolved Hide resolved
tools/deny.toml Outdated Show resolved Hide resolved
Updates clap in pubsys and removes structops.

Signed-off-by: Sean McGinnis <[email protected]>
Tweaks for the newer version of clap.

Signed-off-by: Sean McGinnis <[email protected]>
This removes the structopt dependency in favor of clap.

Signed-off-by: Sean McGinnis <[email protected]>
Copy link
Contributor

@ecpullen ecpullen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@zmrow zmrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥮

@stmcginnis stmcginnis merged commit 386bba7 into bottlerocket-os:develop Jul 6, 2023
38 checks passed
@stmcginnis stmcginnis deleted the clapclapclap branch July 6, 2023 19:23
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.

5 participants