Repository navigation
Description
This is a meta-issue meant to track the work in other issues targeting the Release 3.x milestone.
benevolent takeover notes
Hiii I'm working on getting many maintenance tasks addressed including
taking over this issue from @coilysiren 🙇🏼 who is busy with other life adventures ❤️ ~ @meatballhat
I know 2.0 isn't out yet 🙂 (see #826) but I wanted to create a tracking issue for the 3.x series.
Here's some breaking/difficult changes we want to consider for V3:
- Cleanup redundant code in App/Command #1498
- Fix: Help name consistency among app/commands and subcommands #1489
- Replace code generation with generics where possible/maintainable (First cut at using generics for base flag types #1512 )
-
merge altsrc with main package #1058 - Move man page compatibility to separate package #1055
- Add testify, and update tests to use it rather than expect #1695
-
Improve testability of(conflicts with Consolidate all*cli.Context(via Release 3.x meta/discussion #833 (comment))Contextcode intoCommand#1587) - remove
EnableBashCompletionin favor ofCompletionShells -
consider a different release method (eg. not just merging to(this was changed in v2)master) via Support users who are using GOPATH mode #952 (comment) -
make flags "global" by default, to some degree(this was added into v2) -
Compiledmetadata is not used #753 - Add optional check for duplicated string and int type flags. #1071
-
Cleanup error handling. Make multiError implement ExitCoder - Add integration with golangci-lint #1663
- Strictly limit default dependencies to stdlib #1890 1
- Ensure all exported structs are usable as "zero value" #1775
- Minimize top-level API surface area for both usability clarity and maintenance reduction #1531
- Build out all of the v3 documentation #1891
Please suggest more! I'll add them to this OP
Update ~January 2023: Progress! And yet, yeah, wish lists balanced with releasing usable software is hard to do. If you're the kind of human who finds themselves reading this, there's a v3.0.0-alpha2 tag now, which should play nicely with go get github.com/urfave/cli/v3@latest. Feedback wanted! ❤️ ~ @meatballhat
Footnotes
-
The documentation-related code that depends on
github.com/russross/blackfriday/v2andgithub.com/cpuguy83/go-md2man/v2has been shown to add significant bulk to compiled outputs ↩
Activity
saschagrunert commentedon Aug 3, 2019
Regarding the API we could split it up into an internal and external one. Everything which should not be imported externally would go into the
internalfolder.saschagrunert commentedon Aug 3, 2019
I would love to see fish shell completion support. 💚
coilysiren commentedon Aug 3, 2019
I'm a big fan of tossing tons of code into
internal, its a really cool patterncoilysiren commentedon Aug 3, 2019
For anyone else reading, here's a ticket for that => #351
coilysiren commentedon Aug 3, 2019
Oh! I see now that we call the flag
EnableBashCompletioninstead ofCompletionShells. I'll add this to the OP 👍marwan-at-work commentedon Aug 5, 2019
Since v2 was never officially released, it might be okay to make minimal breaking changes to the v2 branch before merging and releasing it?
I'm happy either way, but if that's more convenient then it should be okay since people know that v2 has not been released yet and so it's okay to make some breaking changes before its officially stable
coilysiren commentedon Aug 17, 2019
^ I'm cleaning up the issues about
altsrc^_^coilysiren commentedon Oct 20, 2019
I'm gonna drop off of guidance for this one - I've got a few other things I can focus on
torkelrogstad commentedon Nov 4, 2019
Commenting here, as it seems like you guys want everything related to
altsrcin this issue. Thanks for all the work you've put in on a great package!I've got two questions about usage of
altsrcto read flags from a config file:It seems like
altsrc.InitInputSourceWithContextreturns an error if there are some flags in the config file which aren't defined, even though said flags aren't marked asRequiredwhen defining them. Is this the intended behavior, or am I doing something wrong here?If marking a flags as
Required, I get an error when executing my command when defining the flag in my config file, but not at the CLI invocation point. This seems like a bug to me, or am I confused about something here?coilysiren commentedon Nov 9, 2019
Yes please!
To your questions - I'm not sure yet what the answers are, but I will totally investigate o7!
69 remaining items
bartekpacia commentedon Mar 10, 2024
Hi! Thank you very much for maintaining this awesome module. When do you expect v3 beta release? Is there anything a random contributor could help with? I have some free time :)
dearchap commentedon Mar 11, 2024
@bartekpacia The only thing preventing us from a beta release is a new arg parser from either @meatballhat or @jtagcat .
jtagcat commentedon Mar 11, 2024
harg exists as a complete parser, I moved it under hcli (WIP, my 'urfave/cli v3') to try integrating it with a CLI wrapper. The place I got stuck with was the logic of nested subcommands.
It has been on the back burner for a while. I've been annoyed for there not being no good cli lib for Go a few times, but instead slapped things together without a library at all.
While it still is on my TODO; I haven't planned for it. Might do it one day, might not.
I think it got noted before, that harg isn't a drop-in to urfave/cli.
bartekpacia commentedon Mar 11, 2024
Alright, thanks!
Are you planning on making some breaking changes? I know such questions might be hard to answer right now since well, it's alpha, but I'd appreciate an answer anyway :-)
Meanwhile I think it would make sense to also release documentation for v3 on the docs website (and of course name it like
v3 (alpha). Possibly relevant issue: #1801jtagcat commentedon Mar 11, 2024
At least my version, yes, breaking.
I don't agree with releasing docs before the exact design/spec is down. My effort is probably separate from urfave/cli (see top post). If you want it, you'll likely want to build it yourself, or buy the work. This issue is 5y old.
meatballhat commentedon Apr 27, 2024
I'd like to include #1885 and then creating a whole new set of docs for the v3 feature set in the list of stuff to do before releasing a v3 beta 💖
abitrolly commentedon Jul 6, 2024
Reducing complexity of the build system #1802 is a blocker for me to continue investigation how the docs are built.
People are migrating to
v3and there is no documentation to check what do they propose #19456543 commentedon Jul 6, 2024
sorry I hope this was the right way to propose an api change ... I just try to make it on pare to EnvVar is to EnvVars ...
6543 commentedon Jul 6, 2024
( it started with #1842 back then and now I would say the only missing piece is #1945 -> used at https://github.com/woodpecker-ci/woodpecker/pull/2951/files#diff-9775ff7ddc807771870ef2bbe9732cc8f952acc54db2b3e72887edaeb0f1370bR34-R38 ...)
dearchap commentedon Jul 7, 2024
@meatballhat Can you chime in ?
6543 commentedon Jul 13, 2024
meatballhat commentedon Oct 12, 2024
Apologies for my big delay! @abitrolly Thank you for raising this up. If this section of the contributing docs isn't working for you, I'd like to treat it as a bug ❤️ https://github.com/urfave/cli/blob/main/docs/CONTRIBUTING.md#docs-output
meatballhat commentedon Jun 11, 2025
Belated closing after moving a few stragglers to post-v3.
abitrolly commentedon Jun 12, 2025
Yes, it doesn't work. See #1802