This repository was archived by the owner on Jan 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dmakarov
approved these changes
Apr 14, 2023
t-nelson
approved these changes
Apr 14, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
automerge label removed due to a CI failure |
Codecov Report
@@ Coverage Diff @@
## master #31194 +/- ##
=======================================
Coverage 81.5% 81.5%
=======================================
Files 729 729
Lines 206304 206321 +17
=======================================
+ Hits 168281 168336 +55
+ Misses 38023 37985 -38 |
mergify bot
pushed a commit
that referenced
this pull request
Apr 14, 2023
* Bump clap v3 * Use fallible method to check for confirm_key (cherry picked from commit 2147f0d) # Conflicts: # Cargo.lock # clap-v3-utils/Cargo.toml
jeffwashington
pushed a commit
to jeffwashington/solana
that referenced
this pull request
Apr 14, 2023
* Bump clap v3 * Use fallible method to check for confirm_key
bw-solana
pushed a commit
to bw-solana/solana
that referenced
this pull request
Jan 10, 2025
…) (solana-labs#31195) * Fix keygen usb panic (debug only) (solana-labs#31194) * Bump clap v3 * Use fallible method to check for confirm_key (cherry picked from commit 2147f0d) * Fix conflicts --------- Co-authored-by: Tyera <tyera@solana.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
In clap v3+,
ArgMatches::is_present()
panics if the arg named is not actually present in the arg definition: https://docs.rs/clap/3.1.5/clap/struct.ArgMatches.html#method.is_presentWe were using
is_present
under the hood in signer resolution to check whether a remote wallet should prompt the user to confirm a used key. But not all callers of those signer-resolution methods are Args that include theconfirm_key
definition;solana-keygen
, for example, does not. So when #24479 upgraded keygen to clap-v3-utils, it introduced a potential panic (only in debug, at least in our current clap version, v3.1.5).Summary of Changes
Update clap-v3 to newest patch, which includes a fallible
ArgMatches::try_contains_id()
methodUse it in usb signer resolution
Closes #31192