Repository navigation
fix(deps): require upstream urfave/sflags instead of the patdowney fork - #21
Merged
Merged
Conversation
The InheritHidden/InheritDeprecated options the fork added were merged upstream (urfave/sflags b88b11d) but are not yet in a tagged release. Require that commit by pseudo-version and drop the replace directive, so consumers get the fix through normal version selection instead of each carrying their own replace (which also blocks `go install module@latest`). Pinned to b88b11d rather than main HEAD to avoid also taking the later strings.SplitN value-splitting change unreviewed. Adds a test pinning the nested hidden/deprecated flag inheritance that consumers rely on to keep config blocks out of --help. Refs #17 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SS4MAynosZMkKwVBuvNmA9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This replaces the
patdowney/sflagsfork with upstreamurfave/sflags, and removes thereplacedirective.The fork's only change, the
InheritHidden()/InheritDeprecated()options, was merged upstream as urfave/sflags@b88b11ddd16a with the same API. Upstream hasn't tagged a release sincev0.4.1, so this requires that commit by pseudo-version:The pseudo-version sorts above
v0.4.1, so consumers get the fix through normal version selection. They no longer have to carry their ownreplace, which also blockedgo install module@latestand let a consumer that forgot it silently build the unpatched version.Notes
b88b11d, notmainHEAD. HEAD also contains the laterstrings.SplitNvalue-splitting change (Use SplitN for map flags to support values containing separators urfave/sflags#45). That should be adopted deliberately rather than as a side effect.TestNewCommand_NestedFlagsInheritParentTagspins the behaviour consumers rely on to keep whole config blocks out of--help: ahiddenordeprecatedtag on a struct field applies to every flag generated from its fields. Nothing tested this before.make verifypasses withGOWORK=off.After merge
dioad/clirelease.dioad/cliand delete the sflagsreplacefromgo.mod.v0.4.2, move from the pseudo-version to the tag.Closes #17
🤖 Generated with Claude Code
https://claude.ai/code/session_01SS4MAynosZMkKwVBuvNmA9