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

**Terrible CLI Library** Both v2/v3 have serious bugs #2066

Open
System233 opened this issue Feb 27, 2025 · 0 comments
Open

**Terrible CLI Library** Both v2/v3 have serious bugs #2066

System233 opened this issue Feb 27, 2025 · 0 comments
Assignees
Labels
area/v2 relates to / is being considered for v2 area/v3 relates to / is being considered for v3 kind/question someone asking a question status/triage maintainers still need to look into this

Comments

@System233
Copy link

The v3 version fails to properly recognize the -- terminator, making it completely unusable in my use case.
Related: #1114 (unresolved) ,#1562 (useless, insane patch) ...

The v2 version can handle the terminator correctly, but it cannot disable the comma-splitting behavior of StringSliceFlag, and cli.separatorSpec is not exported, making all features related to separatorSpec (like WithSeparatorSpec) unavailable.
Related: #1856 ,#1552 (should never happen) , #1878, #1541 ...

The above issues are just what I found, there are definitely more than these

These are all known issues, but they were closed without being fixed.

Additionally, there are weird functions like cli.Args().Slice(), Args().Tail(), etc., and I can only guess their functionality based on their output.

Since I couldn't resolve these issues, I switched to Cobra. I'm just posting this to vent.
Simply changing the command parsing part from urfave/cli to cobra, my binary size dropped from 12MB to 5MB, which is incredible.
Although Cobra’s API isn’t as pleasant to write as urfave/cli, at least it doesn’t have serious bugs and can handle basic command parsing.

Sorry for raising this issue, please feel free to close

@System233 System233 added area/v2 relates to / is being considered for v2 kind/question someone asking a question status/triage maintainers still need to look into this labels Feb 27, 2025
@dearchap dearchap added the area/v3 relates to / is being considered for v3 label Feb 27, 2025
@dearchap dearchap self-assigned this Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/v2 relates to / is being considered for v2 area/v3 relates to / is being considered for v3 kind/question someone asking a question status/triage maintainers still need to look into this
Projects
None yet
Development

No branches or pull requests

2 participants