lightninglabs / lightninglabs/taproot-assets
CLI: Migrate from `urfave/cli` to `spf13/cobra` to resolve misc. known issues
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 525
- Forks
- 150
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 31
Description
The current library used to build the CLI has a few known issues:
Bad overflow handling (returns a 0 instead of an error) - https://github.com/lightningnetwork/lnd/pull/7350#discussion_r1087542359
Hard to prevent bool flags being misused, which causes assets to be minted with incorrect parameters, e.x. - https://github.com/lightninglabs/taro/issues/228
v2 of `urfave/cli` has the same issues as v1, which we currently use. https://cobra.dev/ is at least as well-supported / maintained, properly propogates numerical parsing errors, and has more features for validating input strings.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the repository's current urfave/cli usage and the linked discussions describing overflow handling and unsafe boolean flags. Compare the existing CLI behavior with spf13/cobra's validation and parsing capabilities; done means the CLI has migrated without those known issues.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100