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

Not working with binary literals in Go 1.13 #535

Closed
tanordheim opened this issue May 13, 2019 · 4 comments
Closed

Not working with binary literals in Go 1.13 #535

tanordheim opened this issue May 13, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@tanordheim
Copy link

tanordheim commented May 13, 2019

The upcoming Go 1.13 adds support for binary literals (see golang/go#19308). I'm working on some code using a master-build of Go here and I'm seeing some linter errors on standard library code that got modified to use these new binary literals; primarily in the utf8 package (relevant code).

I'm sure golangci-lint isn't meant to support a not yet released version of Go, I just thought it might be useful to flag this in case it's not something you guys were aware of.

golangci-lint version:

golangci-lint has version 1.16.0 built from 97ea1cb on 2019-03-31T19:48:46Z

config file:

bash-4.4# cat .golangci.yml 
linters:
  enable:
    - govet

Go environment:

bash-4.4# go version
go version go1.13-pre linux/amd64
bash-4.4# go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOFLAGS="-mod=readonly"
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/go"
GOPROXY="direct"
GOROOT="/usr/local/go"
GOSUMDB="off"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/code/go.mod"
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-build995329976=/tmp/go-build -gno-record-gcc-switches"

verbose output:

golangci-lint-verbose.txt

@tanordheim
Copy link
Author

Is there anything quick and dirty I could to in a custom golangci-lint build to work around this in order to get this passing while waiting for an official Go 1.13 release and a matching golangci-lint update?

@tanordheim
Copy link
Author

It seems a source build of golangci-lint with an upgrade of golang.org/x/tools to the latest master version made stuff working again - so I'll do that as a workaround for now :)

@tpounds
Copy link
Contributor

tpounds commented Sep 25, 2019

@tanordheim Is this still an issue with the latest release?

@tpounds tpounds added the bug Something isn't working label Sep 29, 2019
@tanordheim
Copy link
Author

Seems like it, yeah - I switched to 1.19.1 in some of our pipelines here where we previously used a custom build of golangci-lint and it went through without problems. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants