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
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@hummerd
Copy link

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 Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Nov 6, 2020
@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 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.

@stamblerre stamblerre added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Nov 6, 2020
@hummerd
Copy link
Author

hummerd commented Nov 6, 2020

You are right! Master works fine, thank you!

@hummerd hummerd closed this as completed Nov 6, 2020
@golang golang locked and limited conversation to collaborators Nov 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants