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

[clap-v3-utils] Remove deprecated functions #313

Merged

Conversation

samkim-crypto
Copy link

@samkim-crypto samkim-crypto commented Mar 19, 2024

Problem

Solana cla-v3-utils still uses deprecated functions from clap-v2.

Summary of Changes

  • Replaced a number of deprecated functions like possible_values, value_of, and multiple_occurrences with the updated functions from clap-v3.
  • Deprecated some existing parser functions that can be replaced by existing clap-v3 functions
  • Deprecated some panicking functions like keypair_of, keypairs_of, etc. in favor of their try_ variants

Clap-v3 has a feature deprecated that, when included, gives warnings on deprecated functions. With this PR, all the deprecated functions should either be removed or explicitly allowed (on deprecated functions). However, if I include the deprecated feature, it seems to turn this feature on in the rest of the repo on CI checks, so I left it out for now.

This is a port of solana-labs#34989.

Fixes #

Copy link

@CriesofCarrots CriesofCarrots left a comment

Choose a reason for hiding this comment

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

Deprecated tags need updating. Otherwise I am okay with this.

clap-v3-utils/src/input_parsers/mod.rs Outdated Show resolved Hide resolved
Copy link

@CriesofCarrots CriesofCarrots left a comment

Choose a reason for hiding this comment

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

Wfm

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 57.95455% with 37 lines in your changes are missing coverage. Please review.

Project coverage is 81.9%. Comparing base (d4bcdf8) to head (f9b4474).
Report is 16 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #313   +/-   ##
=======================================
  Coverage    81.9%    81.9%           
=======================================
  Files         837      837           
  Lines      226874   226950   +76     
=======================================
+ Hits       185855   185925   +70     
- Misses      41019    41025    +6     

@samkim-crypto samkim-crypto merged commit c7cdf23 into anza-xyz:master Mar 21, 2024
37 checks passed
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.

3 participants