Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Installing golang.org/x/tools/gopls FAILED #3111

Closed
stereoit opened this issue Mar 18, 2020 · 2 comments
Closed

Installing golang.org/x/tools/gopls FAILED #3111

stereoit opened this issue Mar 18, 2020 · 2 comments

Comments

@stereoit
Copy link

What version of Go, VS Code & VS Code Go extension are you using?

  • Run go version to get version of Go

    • go version go1.13.6 linux/amd64
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders

    • 1.43.0
      78a4c91400152c0f27ba4d363eb56d2835f9903a
      x64
  • Check your installed extensions to get the version of the VS Code Go extension

    • 0.13.1
  • Run go env GOOS GOARCH to get the operating system and processor architecture details

    • linux
      amd64

Share the Go related settings you have added/edited

Run Preferences: Open Settings (JSON) command to open your settings.json file.
Share all the settings with the go. or ["go"] prefixes.

"go.useLanguageServer": true,
    
    "go.vetFlags": [
        "-composites=false"
    ],

Describe the bug

After opening VS Code I get message to update tools, clicking update I get failure in the Output tab.
A clear and concise description of what you expected to happen.

Steps to reproduce the behavior:

go.toolsGopath setting is not set. Using GOPATH /home/rsmol/go
Installing 1 tool at /home/rsmol/go/bin in module mode.
  gopls

Installing golang.org/x/tools/gopls FAILED

1 tools failed to install.

gopls:
Error: Command failed: /usr/lib/golang/bin/go get -v golang.org/x/tools/gopls
get "golang.org/x/tools": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at //golang.org/x/tools?go-get=1
get "golang.org/x/tools/gopls": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at //golang.org/x/tools/gopls?go-get=1
get "golang.org/x/tools/gopls": verifying non-authoritative meta tag
go: finding golang.org/x/tools latest
go: downloading golang.org/x/tools v0.0.0-20200318054722-11a475a590ac
go: extracting golang.org/x/tools v0.0.0-20200318054722-11a475a590ac
go get: golang.org/x/tools/[email protected] requires
	golang.org/x/[email protected]: invalid version: unknown revision 6862ededa516
get "golang.org/x/tools": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at //golang.org/x/tools?go-get=1
get "golang.org/x/tools/gopls": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at //golang.org/x/tools/gopls?go-get=1
get "golang.org/x/tools/gopls": verifying non-authoritative meta tag
go: finding golang.org/x/tools latest
go: downloading golang.org/x/tools v0.0.0-20200318054722-11a475a590ac
go: extracting golang.org/x/tools v0.0.0-20200318054722-11a475a590ac
go get: golang.org/x/tools/[email protected] requires
	golang.org/x/[email protected]: invalid version: unknown revision 6862ededa516

Screenshots or recordings

If applicable, add screenshots or recordings to help explain your problem.
image

@hyangah
Copy link
Contributor

hyangah commented Mar 18, 2020

It looks like the go command was trying to download dependencies using git instead of using GOPROXY proxies and hit a git bug. Can you try the workaround mentioned in golang/go#37140 (comment) ?

@stamblerre
Copy link
Contributor

Going to close this issue since there hasn't been much activity here. @stereoit: please reopen if you're still having this issue.

@vscodebot vscodebot bot locked and limited conversation to collaborators May 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants