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 to clap@4.0.x #251

Merged
merged 4 commits into from
Oct 4, 2022
Merged

Update to clap@4.0.x #251

merged 4 commits into from
Oct 4, 2022

Conversation

jessebraham
Copy link
Member

Of course, almost immediately after reworking the CLI they had to publish a new major version on us 😁 cargo_toml published an update requiring changes as well, so I've updated it and any other dependencies with new versions.

Unfortunately in this new version of clap they've taken away the possible_values attribute, so I've had to add a simple macro to replace it. This is incredibly unfortunate, but also not the end of the world.

There were also some small issues with our existing structures for the CLI arguments, so I had to address those as well. The --monitor-baud arg should not have been added to ConnectArgs (this was my bad) so I moved it out. Addressed some visual stuff too, just lowercasing options, etc.

Closes #248

@SergioGasquez
Copy link
Member

Maybe it's also worth updating the #[clap(...)] attributes with the new derive attributes: https://epage.github.io/blog/2022/09/clap4/#more-specific-derive-attributes

@jessebraham
Copy link
Member Author

Thanks for the link, would be really nice if they had some sort of migration guide or something. Half of the issues I ran into i only fixed because I spent a bunch of time searching through the issues and discussions in their repository 😅 Looks like there are a few things I should update though so I'll get that done shortly!

@jessebraham jessebraham merged commit fee2762 into esp-rs:master Oct 4, 2022
@jessebraham jessebraham deleted the fixes/clap branch October 4, 2022 21:26
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.

Update to clap@4.0.x
2 participants