Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Clap3 update: cli #24594

Closed
wants to merge 15 commits into from
Closed

Conversation

KirillLykov
Copy link
Contributor

@KirillLykov KirillLykov commented Apr 22, 2022

Problem

Update clap to v3 for cli. It depends on faucet, client, cli-output which are also updated.

Most of the changes are quite mechanical, but some of the require more attention.
The problem is that the behavior of ArgsMatch method changed: before they returned false/None even in case if argument is not valid argument.
It means that we could write helper functions which don't care about existence of particular argument for particular ArgsMatch.
New behavior is panic in case of invalid argument.

These changes requiring more attention are in separate commits:

Problem with signer

The most elaborated problem is solved in the last commit.
For program signer is not a valid argument. But it is requested here keypair.rs#L804.
Basically, if we have program and use option SignerSourceKind::Pubkey, it always results in error.
The call on program side happens in program.rs#L461 which picks always else branch for the aforementioned case with Pubkey.

The solution presented in latest commit is not perfect because it makes public some structures which were private before, but it solves the problem and passes all the tests.

Summary of Changes

  • cli
  • cli-output
  • faucet
  • client
  • ledger-tool

@stale
Copy link

stale bot commented May 2, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale [bot only] Added to stale content; results in auto-close after a week. label May 2, 2022
@stale stale bot removed the stale [bot only] Added to stale content; results in auto-close after a week. label May 20, 2022
@KirillLykov KirillLykov force-pushed the clap3-upd-cli branch 3 times, most recently from 134ed61 to bd1db97 Compare May 23, 2022 20:35
@KirillLykov KirillLykov force-pushed the clap3-upd-cli branch 5 times, most recently from e018f34 to 81daa4c Compare May 24, 2022 12:57
@stale
Copy link

stale bot commented Jun 12, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Jun 12, 2022
@stale
Copy link

stale bot commented Jul 10, 2022

This stale pull request has been automatically closed. Thank you for your contributions.

@stale stale bot closed this Jul 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stale [bot only] Added to stale content; results in auto-close after a week.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant