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

Fix issues from migrating to clap v3 #1324

Merged
merged 3 commits into from
Feb 25, 2022
Merged

Fix issues from migrating to clap v3 #1324

merged 3 commits into from
Feb 25, 2022

Conversation

nanocryk
Copy link
Contributor

What does it do?

One of the changes of #1319 is the migration from structopt to clap v3 to implement the CLI. However, there are some breaking changes while doing this migration which we were not aware of :

  • In 0.9.17 Dependency Upgrade #1319 I had to change Structopt derive to Parser or Subcommand. It failed to compile and I added a clap(flatten) argument. However this made the key subcommand disapear (because it is flatten). Another argument (clap(subcommand)) must be used instead.
  • require_delimiter was changed to require_value_delimiter, but also no longer imply require_value_delimiter. It is thus necessary to add it explicitely for our --ethapi argument.
  • this breaking change also impact a CLI struct in substrate for try-runtime, which is not fixed upstream. I thus fixed it in our branch, and will make a PR for upstream.
  • I finally cherry-picked a commit from upstream that allow again --reserved-nodes to be provided multiple times (instead of using a single one with values separated with ,). I applied this change to both the try-runtime CLI and our --ethapi.

I only updated the substrate branch, since locks of dependencies (polkadot, cumulus, ...) are not accounted for when building moonbeam.

What important points reviewers should know?

Is there something left for follow-up PRs?

What alternative implementations were considered?

Are there relevant PRs or issues in other repositories (Substrate, Polkadot, Frontier, Cumulus)?

What value does it bring to the blockchain users?

@nanocryk nanocryk added A0-pleasereview Pull request needs code review. B5-clientnoteworthy Changes should be mentioned in any downstream projects' release notes labels Feb 25, 2022
@nanocryk nanocryk added the D3-trivial PR contains trivial changes in a runtime directory that do not require an audit label Feb 25, 2022
@crystalin crystalin merged commit 0c89b92 into master Feb 25, 2022
@crystalin crystalin deleted the jeremy-fix-clap-v3 branch February 25, 2022 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A0-pleasereview Pull request needs code review. B5-clientnoteworthy Changes should be mentioned in any downstream projects' release notes D3-trivial PR contains trivial changes in a runtime directory that do not require an audit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants