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: module upgrade code lens not working with vendoring in v0.5.2 #42418

Closed
hummerd opened this issue Nov 6, 2020 · 2 comments
Closed
Assignees
Milestone

Comments

@hummerd
Copy link

@hummerd hummerd commented Nov 6, 2020

Open go.mod file in VSCode.
I've expected to see available updates for dependencies. But they do not appear. gopls server log says:

Trace - 12:10:38.272 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2020/11/06 12:10:38 code lens upgrade_dependency failed: err: exit status 1: stderr: go list -m: can't determine available upgrades using the vendor directory\n\t(Use -mod=mod or -mod=readonly to bypass.)\n\n"}
golang.org/x/tools/gopls v0.5.2
    golang.org/x/tools/gopls@v0.5.2 h1:lyHTekqy0QhXzz5hDFnfMGHk0Qmuq+LWH5VN/o19YLk=
    github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
    github.com/google/go-cmp@v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k=
    github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
    golang.org/x/mod@v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
    golang.org/x/sync@v0.0.0-20200625203802-6e8e738ad208 h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA=
    golang.org/x/tools@v0.0.0-20201028153306-37f0764111ff h1:TU04fJ6/hxmk+6BeFPKM3iuCGqj0ep6ghDdEdhN1cnk=
    golang.org/x/xerrors@v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
    honnef.co/go/tools@v0.0.1-2020.1.5 h1:nI5egYTGJakVyOryqLs1cQO5dO0ksin5XXs2pspk75k=
    mvdan.cc/gofumpt@v0.0.0-20200802201014-ab5a8192947d h1:t8TAw9WgTLghti7RYkpPmqk4JtQ3+wcP5GgZqgWeWLQ=
    mvdan.cc/xurls/v2@v2.2.0 h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=

~$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/dima/.cache/go-build"
GOENV="/home/dima/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/xxx/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/xxx/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
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-build073715101=/tmp/go-build -gno-record-gcc-switches"
@gopherbot gopherbot added this to the Unreleased milestone Nov 6, 2020
@stamblerre stamblerre changed the title x/tools/gopls: Code lens with module upgrades stoped working in v0.5.2 x/tools/gopls: module upgrade code lens stopped working in v0.5.2 Nov 6, 2020
@stamblerre stamblerre modified the milestones: Unreleased, gopls/v0.5.3 Nov 6, 2020
@stamblerre stamblerre self-assigned this Nov 6, 2020
@stamblerre stamblerre changed the title x/tools/gopls: module upgrade code lens stopped working in v0.5.2 x/tools/gopls: module upgrade code lens not working with vendoring in v0.5.2 Nov 6, 2020
@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Nov 6, 2020

We believe that this has been fixed at master.

@hummerd: Can you try reproducing this at master? You can download it by running GO111MODULE=on go get golang.org/x/tools/gopls@master golang.org/x/tools@master.

@hummerd
Copy link
Author

@hummerd hummerd commented Nov 6, 2020

You are right! Master works fine, thank you!

@hummerd hummerd closed this Nov 6, 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
3 participants