type mismatch error in helpprinter when getting benchdiff
varun06 opened this issue · 2 comments
Hi,
I am getting following errors when I am trying to go get
benchdiff.
❯ go get -u github.com/willabides/benchdiff/cmd/benchdiff
# github.com/willabides/benchdiff/cmd/benchdiff/internal/helpprinter
../../../../go/pkg/mod/github.com/willabides/benchdiff@v0.7.0/cmd/benchdiff/internal/helpprinter/helpprinter.go:31:22: cannot use flag.Group (type *kong.Group) as type string in map index
../../../../go/pkg/mod/github.com/willabides/benchdiff@v0.7.0/cmd/benchdiff/internal/helpprinter/helpprinter.go:33:14: cannot use flag.Group (type *kong.Group) as type string in map index
../../../../go/pkg/mod/github.com/willabides/benchdiff@v0.7.0/cmd/benchdiff/internal/helpprinter/helpprinter.go:37:20: cannot use flags[i].Group (type *kong.Group) as type string in map index
../../../../go/pkg/mod/github.com/willabides/benchdiff@v0.7.0/cmd/benchdiff/internal/helpprinter/helpprinter.go:37:49: cannot use flags[j].Group (type *kong.Group) as type string in map index
../../../../go/pkg/mod/github.com/willabides/benchdiff@v0.7.0/cmd/benchdiff/internal/helpprinter/helpprinter.go:139:39: invalid operation: group[0].Group != "" (mismatched types *kong.Group and string)
../../../../go/pkg/mod/github.com/willabides/benchdiff@v0.7.0/cmd/benchdiff/internal/helpprinter/helpprinter.go:140:35: invalid operation: group[0].Group + "GroupHelp" (mismatched types *kong.Group and string)
Sorry about that. This appears to be from breaking change in github.com/alecthomas/kong somewhere between v0.2.12 and v0.2.16. I'm trying to get this sorted out. In the mean time you can download the binary from https://github.com/WillAbides/benchdiff/releases/tag/v0.7.0
After looking in depth I shouldn't have said it's a backward incompatible change (though technically it was). It was benchdiff's internal package that grouped command line args in the help output. Kong added that ability itself in a way that conflicted with the assumptions I made in the internal package.
I released the fix in v0.7.1 and go get -u github.com/willabides/benchdiff/cmd/benchdiff@v0.7.1
now works for me.