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: updating dependency from CodeLens tries to run "go mod get" #39446

Closed
zikaeroh opened this issue Jun 6, 2020 · 3 comments
Closed
Labels
Milestone

Comments

@zikaeroh
Copy link
Contributor

@zikaeroh zikaeroh commented Jun 6, 2020

Please answer these questions before submitting your issue. Thanks!

What did you do?

Clicked on an "upgrade dependency to ..." code lens in my go.mod

What did you expect to see?

The dependency upgaded.

What did you see instead?

Nothing happens, and in the logs I see:

[Error - 1:31:47 PM] Request workspace/executeCommand failed.
  Message: err: exit status 2: stderr: go mod get: unknown command
Run 'go help mod' for usage.

  Code: 0 

Which seems to imply it's trying to run go mod get as opposed to go get.

Build info

golang.org/x/tools/gopls master
    golang.org/x/tools/gopls@v0.0.0-20200606014950-c42cb6316fb6 h1:buT1PyVEdCfPp6DtNTRsMCJiAWgXkxksEtNXgK3fo7c=
    github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
    github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
    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-20200606014950-c42cb6316fb6 h1:5Y8c5HBW6hBYnGEE3AbJPV0R8RsQmg1/eaJrpvasns0=
    golang.org/x/xerrors@v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
    honnef.co/go/tools@v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8=
    mvdan.cc/xurls/v2@v2.2.0 h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=

Go info

go version go1.14.4 linux/amd64

@gopherbot
Copy link

@gopherbot gopherbot commented Jun 6, 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 this to the Unreleased milestone Jun 6, 2020
@stamblerre stamblerre modified the milestones: Unreleased, gopls/v0.5.0 Jun 7, 2020
@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Jun 7, 2020

Thanks for the report! I bet this was a mistake in a recent CL of mine (https://golang.org/cl/235619). Very surprised that no tests caught it, so I'll send a fix and a test.

@gopherbot
Copy link

@gopherbot gopherbot commented Jun 7, 2020

Change https://golang.org/cl/236841 mentions this issue: internal/lsp: fix update code lens and add a regression test

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
You can’t perform that action at this time.