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

Version format in macOS is different than other platforms #4263

Closed
5 tasks done
jsolana opened this issue Dec 18, 2023 · 7 comments · Fixed by #4279
Closed
5 tasks done

Version format in macOS is different than other platforms #4263

jsolana opened this issue Dec 18, 2023 · 7 comments · Fixed by #4279
Labels
docker PR that update Docker code

Comments

@jsolana
Copy link

jsolana commented Dec 18, 2023

Welcome

Description of the problem

In macOS, golangci-lint version returns its version in different format.

golangci-lint version
golangci-lint has version 1.55.2 built with go1.21.3 from e3c2265 on 2023-11-02T21:40:02Z

Instead of vMajor.minor.patch. Eg using docker alternative:

docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.55.2 golangci-lint version

golangci-lint has version v1.55.2 built with go1.21.3 from e3c2265f on 2023-11-03T13:27:54Z

Version of golangci-lint

$ golangci-lint --version
golangci-lint has version 1.55.2 built with go1.21.3 from e3c2265 on 2023-11-02T21:40:02Z

Configuration

Running sw_vers

ProductName: macOS
ProductVersion: 12.5.1
BuildVersion: 21G83

Go environment

$ go version && go env
go version go1.21.3 darwin/amd64
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/Users/javier.solana/Library/Caches/go-build'
GOENV='/Users/javier.solana/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/javier.solana/go/pkg/mod'
GONOPROXY='gopkg.cabify.tools,gitlab.otters.xyz,secondary.gitlab.otters.xyz,gitlab.com/cabify,github.com/cabify'
GONOSUMDB='gopkg.cabify.tools,gitlab.otters.xyz,secondary.gitlab.otters.xyz,gitlab.com/cabify,github.com/cabify'
GOOS='darwin'
GOPATH='/Users/javier.solana/go'
GOPRIVATE='gopkg.cabify.tools,gitlab.otters.xyz,secondary.gitlab.otters.xyz,gitlab.com/cabify,github.com/cabify'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/Cellar/go/1.21.3/libexec'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/Cellar/go/1.21.3/libexec/pkg/tool/darwin_amd64'
GOVCS=''
GOVERSION='go1.21.3'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='cc'
CXX='c++'
CGO_ENABLED='1'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/zm/4j_1k_j979sffbtvh_jm2wyr0000gr/T/go-build2602725925=/tmp/go-build -gno-record-gcc-switches -fno-common'

Verbose output of running

NA

A minimal reproducible example or link to a public repository

Install golangci-lint following the instructions to install golangci-lint locally in MacOs
Run golanci-lint --version

Validation

  • Yes, I've included all information above (version, config, etc.).
@jsolana jsolana added the bug Something isn't working label Dec 18, 2023
Copy link

boring-cyborg bot commented Dec 18, 2023

Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors.

@ldez ldez added question Further information is requested and removed bug Something isn't working labels Dec 18, 2023
@ldez
Copy link
Member

ldez commented Dec 18, 2023

Hello,

it's not a problem with golangci-lint itself but a problem with homebrew.

We (the golangci-lint maintainers) are not maintainers of the homebrew formula.

@ldez ldez closed this as completed Dec 18, 2023
@jsolana
Copy link
Author

jsolana commented Dec 18, 2023

Sorry, just to confirm, then we must expect to have:

  • v1.55.2 using docker, windows, linux etc.
  • 1.55.2 using macOs

running golanci-lint version

Right?
Thanks!

@ldez
Copy link
Member

ldez commented Dec 18, 2023

If you use our binaries you will see that the version has the same format on all OS.

Homebrew builds the binary from sources, so the version is defined by Homebrew.

https://github.com/Homebrew/homebrew-core/blob/56b593d11f0fadf7f63b0b437a5cb520c83489e1/Formula/g/golangci-lint.rb#L25

It's better to follow the original golangci-lint format but Homebrew can use a different version format, there is no rule.
We (the golangci-lint maintainers) are not maintainers of the homebrew formula.

@jsolana
Copy link
Author

jsolana commented Dec 18, 2023

Nice thanks a lot!

@ldez
Copy link
Member

ldez commented Dec 18, 2023

There is a typo in my previous message: We (the golangci-lint maintainers) are not maintainers of the homebrew formula.

@ldez ldez changed the title golangci-lint version format in macOS is different than other platforms Version format in macOS is different than other platforms Dec 19, 2023
@ldez ldez added docker PR that update Docker code and removed question Further information is requested labels Dec 21, 2023
@ldez
Copy link
Member

ldez commented Dec 21, 2023

In fact there is a problem with the build of the Docker image: #4268

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker PR that update Docker code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants