Giter VIP home page Giter VIP logo

Comments (5)

stamblerre avatar stamblerre commented on August 25, 2024

It looks like you're using an old version of gopls. Can you update it by opening the Command Palette (Ctrl + Shift + P) and running the Go: Install/Update Tools command to update gopls?

from vscode-go.

clippit avatar clippit commented on August 25, 2024

I've tried update tools from command palette, but gopls version is still v0.1.7. That's indeed a pretty old version since latest is v0.4.1 now.

I tried clean up GOPATH directory and rerun the command to install all tools, it shows golang.org/x/tools/gopls SUCCEEDED but the version is still v0.1.7. github.com/uudashr/gopkgs/v2/cmd/gopkgs is failed to install at the same time, which maybe an another issue of related to this?

go.toolsGopath setting is not set. Using GOPATH /Users/zhangletian/Dev/go
Installing 18 tools at /Users/zhangletian/Dev/go/bin in module mode.
  gocode
  gopkgs
  go-outline
  go-symbols
  guru
  gorename
  gotests
  gomodifytags
  impl
  fillstruct
  goplay
  godoctor
  dlv
  gocode-gomod
  godef
  goreturns
  golint
  gopls

Installing github.com/mdempsky/gocode SUCCEEDED
Installing github.com/uudashr/gopkgs/v2/cmd/gopkgs FAILED
Installing github.com/ramya-rao-a/go-outline SUCCEEDED
Installing github.com/acroca/go-symbols SUCCEEDED
Installing golang.org/x/tools/cmd/guru SUCCEEDED
Installing golang.org/x/tools/cmd/gorename SUCCEEDED
Installing github.com/cweill/gotests/... SUCCEEDED
Installing github.com/fatih/gomodifytags SUCCEEDED
Installing github.com/josharian/impl SUCCEEDED
Installing github.com/davidrjenni/reftools/cmd/fillstruct SUCCEEDED
Installing github.com/haya14busa/goplay/cmd/goplay SUCCEEDED
Installing github.com/godoctor/godoctor SUCCEEDED
Installing github.com/go-delve/delve/cmd/dlv SUCCEEDED
Installing github.com/stamblerre/gocode SUCCEEDED
Installing github.com/rogpeppe/godef SUCCEEDED
Installing github.com/sqs/goreturns SUCCEEDED
Installing golang.org/x/lint/golint SUCCEEDED
Installing golang.org/x/tools/gopls SUCCEEDED

1 tools failed to install.

gopkgs:
Error: Command failed: /usr/local/bin/go get -v github.com/uudashr/gopkgs/v2/cmd/gopkgs
go: downloading github.com/uudashr/gopkgs v1.3.2
go: downloading github.com/uudashr/gopkgs/v2 v2.1.1
go: downloading github.com/uudashr/gopkgs v2.0.1+incompatible
go get github.com/uudashr/gopkgs/v2/cmd/gopkgs: module github.com/uudashr/gopkgs/v2@upgrade found (v2.1.1), but does not contain package github.com/uudashr/gopkgs/v2/cmd/gopkgs
go: downloading github.com/uudashr/gopkgs v1.3.2
go: downloading github.com/uudashr/gopkgs/v2 v2.1.1
go: downloading github.com/uudashr/gopkgs v2.0.1+incompatible
go get github.com/uudashr/gopkgs/v2/cmd/gopkgs: module github.com/uudashr/gopkgs/v2@upgrade found (v2.1.1), but does not contain package github.com/uudashr/gopkgs/v2/cmd/gopkgs

from vscode-go.

stamblerre avatar stamblerre commented on August 25, 2024

The gopkgs issue is probably uudashr/gopkgs#25, but I'm not sure.

Does /Users/zhangletian/Dev/go/bin/gopls version also show v0.1.7? If not, then you may have 2 different versions of gopls installed on your machine. You can try which gopls to see which one VS Code Go is using. Do you have go.toolsGopath configured?

from vscode-go.

clippit avatar clippit commented on August 25, 2024

I cleaned up GOPATH again and set go env -w GOPROXY=direct then rerun Go: Install/Update Tools, all succeed this time(including gopkgs) and gopls version shows 0.4.0. It might be some issues with my company's internal goproxy server which SHOULD plays as a mirror when fetching external packages. I'll take a look into the problem but it is fine without that cranky goproxy:) Thanks!

from vscode-go.

detailyang avatar detailyang commented on August 25, 2024

It works via reinstall Go: Install/Update Tools

from vscode-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.