You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 5, 2025. It is now read-only.
I started work on this but it's going to be quite tricky and I don't believe it's possible to do without breaking invocations that currently work. The two primary issues are:
The flag library is intended for a single-function binary (really, a server) but santactl is a multi-command tool with different flags for different subcommands. This has a couple of side-effects:
a) If two commands define the same flag it causes a linker error. This can be worked around by putting those flags in a separate file with a shared header but then those flags can't have different help text.
b) Usage/help text doesn't work properly because absl assumes all flags apply to all commands.
Support for repeated flags is a little limited and works very differently to how it does currently. For example, you can use std::vector<std::string> as the flag's type and it will break the passed string on , but we have commands (e.g. fileinfo) where you can pass a flag multiple times to add more values. It's not possible to do this with absl flag, even with custom types.
# for freeto subscribe to this conversation on GitHub.
Already have an account?
#.
There's a lot of hard to test command line parsing in santactl. This should be refactored to use Abseil's Flag library.
The text was updated successfully, but these errors were encountered: