neo-go icon indicating copy to clipboard operation
neo-go copied to clipboard

cli: upgrade urfave lib to v2

Open AliceInHunterland opened this issue 1 year ago • 7 comments

  • [x] https://github.com/nspcc-dev/neo-go/issues/2861,
  • [x] https://github.com/nspcc-dev/neo-go/issues/2886.
  • [x] https://github.com/nspcc-dev/neo-go/issues/3097#issuecomment-2191090318
  • [x] https://github.com/nspcc-dev/neo-go/pull/3477#discussion_r1654571447.

Close #3097

AliceInHunterland avatar Jun 27 '24 17:06 AliceInHunterland

@AliceInHunterland, https://github.com/nspcc-dev/neo-go/issues/2628 is not needed, so exclude it from the list. Also, add the improvements suggestion from https://github.com/nspcc-dev/neo-go/issues/3097#issuecomment-2191090318.

AnnaShaleva avatar Jun 28 '24 08:06 AnnaShaleva

About this error:

                Error:          Expect "Error: failed to decode prefix from hex: encoding/hex: invalid byte: U+002D '-'
                                " to match "02: 02"

Try to remove e.checkStorage lines and see what is the original output of the CLI and why it has been produced. Probably urfave V2 have updated output formatters.

AnnaShaleva avatar Jun 28 '24 08:06 AnnaShaleva

About this error:

I see that it's a VM handler error, thus try to look at the argument provided to prefix, err = hex.DecodeString(c.Args().Get(1)).

AnnaShaleva avatar Jun 28 '24 08:06 AnnaShaleva

Codecov Report

Attention: Patch coverage is 79.39914% with 144 lines in your changes missing coverage. Please review.

Project coverage is 86.09%. Comparing base (25dddc3) to head (d4a3c91).

Files Patch % Lines
cli/wallet/nep17.go 35.41% 31 Missing :warning:
cli/wallet/wallet.go 87.23% 18 Missing :warning:
cli/smartcontract/smart_contract.go 91.90% 14 Missing :warning:
cli/query/query.go 56.66% 13 Missing :warning:
cli/server/server.go 81.25% 12 Missing :warning:
cli/util/cancel.go 38.46% 8 Missing :warning:
cli/wallet/nep11.go 75.75% 8 Missing :warning:
cli/util/dump.go 33.33% 6 Missing :warning:
cli/wallet/multisig.go 53.84% 6 Missing :warning:
cli/vm/cli.go 70.58% 5 Missing :warning:
... and 11 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3495      +/-   ##
==========================================
- Coverage   86.10%   86.09%   -0.01%     
==========================================
  Files         331      330       -1     
  Lines       38568    38641      +73     
==========================================
+ Hits        33209    33269      +60     
- Misses       3827     3835       +8     
- Partials     1532     1537       +5     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jun 28 '24 13:06 codecov[bot]

Also, please, include this change: https://github.com/nspcc-dev/neo-go/pull/3477#discussion_r1654571447.

AnnaShaleva avatar Jun 28 '24 16:06 AnnaShaleva

Also was thinking about unified Usage text. Sometimes we have -o file [-s start] [-c count] and sometimes its --wif <wif> [--name <account_name>].

AliceInHunterland avatar Jul 08 '24 08:07 AliceInHunterland

Also was thinking about unified Usage text.

Not in this PR, let's create an issue for that.

AnnaShaleva avatar Jul 08 '24 16:07 AnnaShaleva