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

Flags no longer sort by definition order #1420

Closed
3 tasks done
meatballhat opened this issue Jun 20, 2022 · 0 comments · Fixed by #1430
Closed
3 tasks done

Flags no longer sort by definition order #1420

meatballhat opened this issue Jun 20, 2022 · 0 comments · Fixed by #1430
Assignees
Labels
area/v2 relates to / is being considered for v2 kind/bug describes or fixes a bug
Milestone

Comments

@meatballhat
Copy link
Member

My urfave/cli version is

v2.10.2

Checklist

  • Are you running the latest v2 release? The list of releases is here.
  • Did you check the manual for your release? The v2 manual is here
  • Did you perform a search about this problem? Here's the Github guide about searching.

Dependency Management

  • My project is using go modules.

Describe the bug

Flags used to be shown in help text output in the same order in which they are defined in code, but they now show up as sorted by name.

To reproduce

Define more than one flag in non-lexicographical order and then view the help text output.

Observed behavior

Flags are displayed in help text output sorted lexicographically by name.

Expected behavior

Flags are displayed in the same order as they are defined in code.

Additional context

See #1411

Run go version and paste its output here

go version go1.18.3 linux/amd64

Run go env and paste its output here

GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/me/.cache/go-build"
GOENV="/home/me/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/me/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/me/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/me/.gimme/versions/go1.18.3.linux.amd64"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/me/.gimme/versions/go1.18.3.linux.amd64/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.18.3"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/me/code/urfave/cli/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2352080075=/tmp/go-build -gno-record-gcc-switches"
@meatballhat meatballhat added kind/bug describes or fixes a bug area/v2 relates to / is being considered for v2 labels Jun 20, 2022
@meatballhat meatballhat added this to the Release 2.x milestone Jun 20, 2022
@meatballhat meatballhat self-assigned this Jun 20, 2022
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 kind/bug describes or fixes a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant