Repository navigation
chore(x): remove the unused x/release helper - #722
Merged
Merged
Conversation
Benehiko
force-pushed
the
chore/drop-cobra-from-x
branch
from
October 29, 2026 15:49
df10575 to
e78ddc3
Compare
Benehiko
force-pushed
the
chore/drop-cobra-from-x
branch
from
October 29, 2026 15:51
e78ddc3 to
e2ab79b
Compare
docker-agent
left a comment
Contributor
There was a problem hiding this comment.
Assessment: 🟡 NEEDS ATTENTION
Two behavioral regressions introduced by replacing cobra with the standard flag package:
--helpfails outside a git repository: the.gitexistence check runs before theflag.FlagSetis set up, so any invocation from a non-repo directory returns a misleading error instead of printing usage.- Flag-parse errors print twice: with
flag.ContinueOnError, theflagpackage writes the error internally before returning it, andmainprints it a second time. Suppressing the internal output withflags.SetOutput(io.Discard)would fix this.
The core rewrite (interspersed parsing, Level as flag.Value, go.mod cleanup) looks correct.
Releases are no longer cut with x/release, yet it kept spf13/cobra and spf13/pflag in the go.mod of the x library module. Remove the helper, its docs/releasing.md, and the make bump target that ran it. This drops cobra, pflag, and mousetrap from x. Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com>
Benehiko
force-pushed
the
chore/drop-cobra-from-x
branch
from
October 29, 2026 15:51
e2ab79b to
33cc0d8
Compare
Benehiko
enabled auto-merge
October 29, 2026 15:52
joe0BAB
approved these changes
Oct 29, 2026
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.
Releases are no longer cut with the x/release helper, but it kept spf13/cobra and spf13/pflag in the go.mod of the x library module that every other module depends on.
This removes:
Drops cobra, pflag and mousetrap from x/go.mod, and the vendored golang.org/x/mod/modfile, module and internal/lazyregexp packages that only the helper used. golang.org/x/mod stays in x only for the semver differential test in x/api added by #719. cobra stays in vendor/modules.txt because plugins/pass still uses it.
Builds for all workspace modules, go test ./x/... and golangci-lint on ./x/... pass. Tidied and vendored with make mod.