Skip to content

gopls (v0.4.1) cannot be installed with go1.12 #293

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

Closed
strowk opened this issue Jul 6, 2020 · 1 comment
Closed

gopls (v0.4.1) cannot be installed with go1.12 #293

strowk opened this issue Jul 6, 2020 · 1 comment
Labels
FrozenDueToAge upstream-tools Issues that are caused by problems in the tools that the extension depends on.

Comments

@strowk
Copy link

strowk commented Jul 6, 2020

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

  • Run go version to get version of Go
    • go version go1.12.4 windows/amd64
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders
    • 1.46.1
  • Check your installed extensions to get the version of the VS Code Go extension
    • v0.15.0
  • Run go env to get the go development environment details
    set GOARCH=amd64
    set GOBIN=
    set GOCACHE=C:\Users\usr\AppData\Local\go-build
    set GOEXE=.exe
    set GOFLAGS=
    set GOHOSTARCH=amd64
    set GOHOSTOS=windows
    set GOOS=windows
    set GOPATH=C:\Users\usr\go
    set GOPROXY=
    set GORACE=
    set GOROOT=C:\Go
    set GOTMPDIR=
    set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
    set GCCGO=gccgo
    set CC=gcc
    set CXX=g++
    set CGO_ENABLED=1
    set GOMOD=C:\vms\deb0\proj\proj\go.mod
    set CGO_CFLAGS=-g -O2
    set CGO_CPPFLAGS=
    set CGO_CXXFLAGS=-g -O2
    set CGO_FFLAGS=-g -O2
    set CGO_LDFLAGS=-g -O2
    set PKG_CONFIG=pkg-config
    set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\usr\AppData\Local\Temp\go-build826520658=/tmp/go-build -gno-record-gcc-switches

Describe the bug

Cannot install "[email protected]"

Installing 1 tool at C:\Users\strow\go\bin in module mode.
  [email protected]

Installing golang.org/x/tools/[email protected] FAILED

1 tools failed to install.

gopls: failed to install [object Object]: Error: Command failed: C:\Go\bin\go.exe get -v golang.org/x/tools/[email protected]
Fetching https://golang.org/x/tools/gopls?go-get=1
Parsing meta tags from https://golang.org/x/tools/gopls?go-get=1 (status code 200)
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 https://golang.org/x/tools/gopls?go-get=1
get "golang.org/x/tools/gopls": verifying non-authoritative meta tag
Fetching https://golang.org/x/tools?go-get=1
Parsing meta tags from https://golang.org/x/tools?go-get=1 (status code 200)
go: finding golang.org/x/tools/gopls v0.4.1
Fetching https://golang.org/x/tools?go-get=1
go: finding github.com/sergi/go-diff v1.1.0
Parsing meta tags from https://golang.org/x/tools?go-get=1 (status code 200)
get "golang.org/x/tools": found meta tag get.metaImport{Prefix:"golang.org/x/tools", VCS:"git", RepoRoot:"https://go.googlesource.com/tools"} at https://golang.org/x/tools?go-get=1
go: finding golang.org/x/tools v0.0.0-20200513154647-78b527d18275
Fetching https://gopkg.in/check.v1?go-get=1
Fetching https://gopkg.in/yaml.v2?go-get=1
Parsing meta tags from https://gopkg.in/check.v1?go-get=1 (status code 200)
get "gopkg.in/check.v1": found meta tag get.metaImport{Prefix:"gopkg.in/check.v1", VCS:"git", RepoRoot:"https://gopkg.in/check.v1"} at https://gopkg.in/check.v1?go-get=1
go: finding gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15
Parsing meta tags from https://gopkg.in/yaml.v2?go-get=1 (status code 200)
get "gopkg.in/yaml.v2": found meta tag get.metaImport{Prefix:"gopkg.in/yaml.v2", VCS:"git", RepoRoot:"https://gopkg.in/yaml.v2"} at https://gopkg.in/yaml.v2?go-get=1
go: finding gopkg.in/yaml.v2 v2.2.4
go: finding github.com/yuin/goldmark v1.1.27
go: downloading golang.org/x/tools v0.0.0-20200513154647-78b527d18275
go: extracting golang.org/x/tools v0.0.0-20200513154647-78b527d18275
go: downloading golang.org/x/tools/gopls v0.4.1
go: extracting golang.org/x/tools/gopls v0.4.1
go: downloading golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e
Fetching https://golang.org/x/sync?go-get=1
go: downloading github.com/sergi/go-diff v1.1.0
go: downloading golang.org/x/mod v0.2.0
Fetching https://golang.org/x/mod?go-get=1
go: downloading golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543
Fetching https://golang.org/x/xerrors?go-get=1
Parsing meta tags from https://golang.org/x/sync?go-get=1 (status code 200)
get "golang.org/x/sync": found meta tag get.metaImport{Prefix:"golang.org/x/sync", VCS:"git", RepoRoot:"https://go.googlesource.com/sync"} at https://golang.org/x/sync?go-get=1
Parsing meta tags from https://golang.org/x/mod?go-get=1 (status code 200)
get "golang.org/x/mod": found meta tag get.metaImport{Prefix:"golang.org/x/mod", VCS:"git", RepoRoot:"https://go.googlesource.com/mod"} at https://golang.org/x/mod?go-get=1
Parsing meta tags from https://golang.org/x/xerrors?go-get=1 (status code 200)
get "golang.org/x/xerrors": found meta tag get.metaImport{Prefix:"golang.org/x/xerrors", VCS:"git", RepoRoot:"https://go.googlesource.com/xerrors"} at https://golang.org/x/xerrors?go-get=1
go: extracting github.com/sergi/go-diff v1.1.0
go: extracting golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e
go: extracting golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543
go: extracting golang.org/x/mod v0.2.0
golang.org/x/mod/semver
golang.org/x/xerrors/internal
honnef.co/go/tools/arg
github.com/sergi/go-diff/diffmatchpatch
golang.org/x/tools/internal/span
golang.org/x/xerrors
golang.org/x/mod/internal/lazyregexp
golang.org/x/tools/go/ast/astutil
golang.org/x/tools/internal/lsp/diff
golang.org/x/mod/module
golang.org/x/tools/go/analysis/passes/internal/analysisutil
golang.org/x/tools/go/ast/inspector
golang.org/x/tools/go/cfg
golang.org/x/mod/modfile
golang.org/x/tools/internal/analysisinternal
golang.org/x/tools/go/types/typeutil
golang.org/x/tools/go/analysis
golang.org/x/tools/go/internal/gcimporter
golang.org/x/tools/internal/event/label
golang.org/x/tools/go/analysis/passes/asmdecl
golang.org/x/tools/go/analysis/passes/inspect
golang.org/x/tools/go/analysis/passes/buildtag
golang.org/x/tools/go/analysis/passes/assign
golang.org/x/tools/go/analysis/passes/atomic
golang.org/x/tools/go/analysis/passes/atomicalign
golang.org/x/tools/go/analysis/passes/bools
golang.org/x/tools/go/analysis/passes/cgocall
golang.org/x/tools/go/analysis/passes/composite
golang.org/x/tools/go/analysis/passes/copylock
golang.org/x/tools/go/analysis/passes/deepequalerrors
golang.org/x/tools/go/analysis/passes/errorsas
golang.org/x/tools/go/analysis/passes/httpresponse
golang.org/x/tools/go/analysis/passes/loopclosure
golang.org/x/tools/go/analysis/passes/ctrlflow
golang.org/x/tools/go/analysis/passes/nilfunc
golang.org/x/tools/go/analysis/passes/printf
golang.org/x/tools/go/analysis/passes/shift
golang.org/x/tools/go/analysis/passes/lostcancel
golang.org/x/tools/go/analysis/passes/sortslice
golang.org/x/tools/go/analysis/passes/stdmethods
golang.org/x/tools/go/analysis/passes/structtag
golang.org/x/tools/go/analysis/passes/testinggoroutine
golang.org/x/tools/go/analysis/passes/tests
golang.org/x/tools/go/analysis/passes/unmarshal
golang.org/x/tools/go/analysis/passes/unreachable
golang.org/x/tools/go/analysis/passes/unsafeptr
golang.org/x/tools/go/analysis/passes/unusedresult
golang.org/x/tools/go/gcexportdata
golang.org/x/tools/internal/event/keys
golang.org/x/tools/internal/fastwalk
golang.org/x/tools/internal/lsp/analysis/fillreturns
golang.org/x/tools/internal/lsp/analysis/nonewvars
golang.org/x/tools/internal/gopathwalk
golang.org/x/tools/internal/lsp/analysis/noresultvalues
golang.org/x/tools/internal/lsp/analysis/simplifycompositelit
golang.org/x/tools/internal/lsp/analysis/simplifyrange
golang.org/x/tools/internal/event/core
golang.org/x/tools/internal/lsp/analysis/simplifyslice
golang.org/x/tools/internal/lsp/analysis/undeclaredname
golang.org/x/tools/internal/lsp/analysis/unusedparams
golang.org/x/tools/internal/lsp/debug/tag
golang.org/x/tools/internal/event
golang.org/x/tools/internal/lsp/diff/myers
golang.org/x/tools/internal/lsp/fuzzy
golang.org/x/tools/internal/lsp/snippet
golang.org/x/tools/internal/xcontext
golang.org/x/tools/internal/gocommand
golang.org/x/tools/internal/event/export
golang.org/x/tools/internal/jsonrpc2
golang.org/x/tools/refactor/satisfy
golang.org/x/tools/go/internal/packagesdriver
# golang.org/x/tools/internal/jsonrpc2
C:\Users\usr\go\pkg\mod\golang.org\x\[email protected]\internal\jsonrpc2\messages.go:168:5: undefined: errors.As
golang.org/x/tools/internal/packagesinternal
golang.org/x/tools/internal/imports
golang.org/x/tools/go/packages
honnef.co/go/tools/go/types/typeutil
honnef.co/go/tools/ir
golang.org/x/tools/go/types/objectpath
github.com/BurntSushi/toml
honnef.co/go/tools/internal/robustio
honnef.co/go/tools/internal/renameio
honnef.co/go/tools/internal/cache
honnef.co/go/tools/loader
golang.org/x/tools/go/buildutil
honnef.co/go/tools/config
honnef.co/go/tools/version
honnef.co/go/tools/deprecated
golang.org/x/tools/go/internal/cgo
honnef.co/go/tools/printf
mvdan.cc/xurls/v2
golang.org/x/tools/internal/event/export/metric
golang.org/x/tools/go/loader
honnef.co/go/tools/functions
honnef.co/go/tools/internal/passes/buildir
golang.org/x/tools/internal/event/export/ocagent/wire
honnef.co/go/tools/ir/irutil
golang.org/x/tools/internal/event/export/prometheus
golang.org/x/tools/internal/event/export/ocagent
honnef.co/go/tools/facts
golang.org/x/tools/internal/lsp/browser
golang.org/x/sync/errgroup
golang.org/x/tools/internal/memoize
golang.org/x/tools/internal/tool
honnef.co/go/tools/lint
honnef.co/go/tools/lint/lintutil/format
honnef.co/go/tools/code
honnef.co/go/tools/report
honnef.co/go/tools/pattern
honnef.co/go/tools/lint/lintutil
honnef.co/go/tools/edit
honnef.co/go/tools/lint/lintdsl
honnef.co/go/tools/internal/sharedcheck
honnef.co/go/tools/stylecheck
honnef.co/go/tools/simple
honnef.co/go/tools/staticcheck
 undefined  

Steps to reproduce the behavior:

  1. Open VSCode
  2. Notice that extension does not work properly anymore (intellisense, error highlight)
  3. See message "A new version of gopls (v0.4.1) is available. Please update for an improved experience."
  4. Click on Update
  5. See error in Output
@hyangah hyangah changed the title gopls (v0.4.1) cannot be installed gopls (v0.4.1) cannot be installed with go1.12 Jul 6, 2020
@hyangah
Copy link
Contributor

hyangah commented Jul 6, 2020

Duplicate of golang/go#39146

Upgrading go to 1.13 or 1.14 will fix this. If you need 1.12, can you please comment in the above issue on why you need to use 1.12? Thanks!

@hyangah hyangah closed this as completed Jul 6, 2020
@hyangah hyangah added the upstream-tools Issues that are caused by problems in the tools that the extension depends on. label Jul 6, 2020
@golang golang locked and limited conversation to collaborators Jul 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge upstream-tools Issues that are caused by problems in the tools that the extension depends on.
Projects
None yet
Development

No branches or pull requests

3 participants