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

Travis-CI: Context loading failed: could not determine GOARCH and Go compiler #397

Closed
llorllale opened this issue Feb 16, 2019 · 7 comments
Labels
bug Something isn't working

Comments

@llorllale
Copy link

llorllale commented Feb 16, 2019

  1. Version of golangci-lint: v1.14.0

  2. .golangci.yml
    See here

  3. Go environment:

go version go1.11.5 linux/amd64
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/travis/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/travis/gopath"
GOPROXY=""
GORACE=""
GOROOT="/home/travis/.gimme/versions/go1.11.5.linux.amd64"
GOTMPDIR=""
GOTOOLDIR="/home/travis/.gimme/versions/go1.11.5.linux.amd64/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
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-build698695726=/tmp/go-build -gno-record-gcc-switches"
  1. Verbose output of running: golangci-lint run -v
    See this Travis build
@llorllale
Copy link
Author

I can reproduce the issue locally if I run the docker image, but not if I run the binary directly.

@llorllale
Copy link
Author

I've narrowed the issue down to one configuration in my .golangci.yml: modules-download-mode: readonly. I just commented it out and it works.

@jirfag
Copy link
Contributor

jirfag commented Feb 18, 2019

hi, thank you!
you don't see a proper error because of poor error handling of go list in go/packages. Will be fixed in #401

@kf6nux
Copy link

kf6nux commented Mar 22, 2019

Same error, possibly different issue:
I found if we failed to configure git to use ssh instead of https, golangci-lint would fail at the go list stage when attempting to get a private repo.

@martinsirbe
Copy link
Contributor

Seeing the same issue as @kf6nux because of this, it's not possible to use https with a github token.

@stale
Copy link

stale bot commented Oct 4, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale No recent correspondence or work activity label Oct 4, 2019
@tpounds tpounds added the bug Something isn't working label Oct 4, 2019
@stale stale bot removed the stale No recent correspondence or work activity label Oct 4, 2019
@jirfag
Copy link
Contributor

jirfag commented Oct 15, 2019

#401 was fixed, now we have normal errors, closing

@jirfag jirfag closed this as completed Oct 15, 2019
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

5 participants