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

x/tools/gopls 410 on private repository (not default branch) #39569

Closed
ptcar2009 opened this issue Jun 12, 2020 · 3 comments
Closed

x/tools/gopls 410 on private repository (not default branch) #39569

ptcar2009 opened this issue Jun 12, 2020 · 3 comments

Comments

@ptcar2009
Copy link

@ptcar2009 ptcar2009 commented Jun 12, 2020

What version of Go are you using (go version)?

$ go version
go version go1.14.4 linux/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
"GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/ptcar/.cache/go-build"
GOENV="/home/ptcar/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY="gitlab.private_domain.com"
GONOSUMDB="gitlab.private_domain.com"
GOOS="linux"
GOPATH="/home/ptcar/go"
GOPRIVATE="gitlab.private_domain.com"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
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-build272683541=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Using gopls on vscode, trying to import from private repository, on a branch with a tag that is not the master or default branch (on gitlab) with GOPRIVATE set for the subdomain I'm using.
go mod tidy works fine and gopls works fine aswell if I don't specify the tag on go.mod.

What did you expect to see?

Expected to see gopls being able to import the package (which is downloaded on my go path).

What did you see instead?

[Error - 6:16:04 PM] Request textDocument/codeLens failed.
  Message: err: exit status 1: stderr: go: gitlab.inspr.com/chimera/client-golang@v1.0.0-beta-6/go.mod: verifying module: gitlab.inspr.com/chimera/client-golang@v1.0.0-beta-6/go.mod: reading https://sum.golang.org/lookup/gitlab.inspr.com/chimera/client-golang@v1.0.0-beta-6: 410 Gone
	server response: not found: gitlab.inspr.com/chimera/client-golang@v1.0.0-beta-6: invalid version: unknown revision v1.0.0-beta-6

Build info

golang.org/x/tools/gopls 0.4.1
    golang.org/x/tools/gopls@v0.4.1 h1:0e3BPxGV4B3cd0zdMuccwW72SgmHp92lAjOyxX/ScAw=
    github.com/BurntSushi/toml@v0.3.1
    github.com/sergi/go-diff@v1.1.0
    golang.org/x/mod@v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ=
    golang.org/x/sync@v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY=
    golang.org/x/tools@v0.0.0-20200513154647-78b527d18275 h1:e7nYe9s94RHunFJ7b+mmPxiQMOKMVSqYASToWb1EcHs=
    golang.org/x/xerrors@v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
    honnef.co/go/tools@v0.0.1-2020.1.3 h1:sXmLre5bzIR6ypkjXCDI3jHPssRhc8KD/Ome589sc3U=
    mvdan.cc/xurls/v2@v2.1.0 h1:KaMb5GLhlcSX+e+qhbRJODnUUBvlw01jt4yrjFIHAuA=
@gopherbot gopherbot added the Tools label Jun 12, 2020
@gopherbot
Copy link

@gopherbot gopherbot commented Jun 12, 2020

Thank you for filing a gopls issue! Please take a look at the Troubleshooting guide, and make sure that you have provided all of the relevant information here.

@gopherbot gopherbot added the gopls label Jun 12, 2020
@gopherbot gopherbot added this to the Unreleased milestone Jun 12, 2020
@heschik
Copy link
Contributor

@heschik heschik commented Jun 12, 2020

At the beginning of the gopls logs should be a dump of the environment it's using. Can you show us that? Do the same errors come from packages.Load calls too?

@ptcar2009
Copy link
Author

@ptcar2009 ptcar2009 commented Jun 15, 2020

@heschik vscode was changing my go env (sorry about that)

@ptcar2009 ptcar2009 closed this Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.