Skip to content

x/tools/gopls: fail gracefully without a Go installation #41701

@jherman

Description

@jherman

gopls version: v0.5.0
gopls flags:

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

panic: err: go command required, not found: exec: "go": executable file not found in %PATH%: stderr: 

goroutine 151 [running]:
golang.org/x/tools/internal/lsp/debug.PrintVersionInfo.func2()
	  info.go:58  0x253
golang.org/x/tools/internal/lsp/debug.section(0x17e0800, 0xc00060e330, 0x0, 0x16b4841, 0x7, 0xc00036cf28)
	  info.go:69  0x332
golang.org/x/tools/internal/lsp/debug.PrintVersionInfo(0x17f41e0, 0xc000535700, 0x17e0800, 0xc00060e330, 0x1, 0x0)
	  info.go:52  0x1b0
golang.org/x/tools/internal/lsp.(*Server).initialize(0xc0001add60, 0x17f41e0, 0xc000535700, 0xc000358000, 0x0, 0x0, 0x0)
	  general.go:87  0x58f
golang.org/x/tools/internal/lsp.(*Server).Initialize(0xc0001add60, 0x17f41e0, 0xc000535700, 0xc000358000, 0xc000358000, 0x0, 0x0)
	  server_gen.go:108  0x50
golang.org/x/tools/internal/lsp/protocol.serverDispatch(0x17f41e0, 0xc000535700, 0x1808560, 0xc0001add60, 0xc00034c360, 0x17f4420, 0xc000535680, 0x0, 0x17e1f80, 0xc000356000)
	  tsserver.go:235  0x4e2
golang.org/x/tools/internal/lsp/protocol.ServerHandler.func1(0x17f41e0, 0xc000535700, 0xc00034c360, 0x17f4420, 0xc000535680, 0x3ef1d19, 0x1c41740)
	  protocol.go:63  0xc7
golang.org/x/tools/internal/lsp/lsprpc.handshaker.func1(0x17f41e0, 0xc000535700, 0xc00034c360, 0x17f4420, 0xc000535680, 0x0, 0x0)
	  lsprpc.go:557  0x452
golang.org/x/tools/internal/jsonrpc2.MustReplyHandler.func1(0x17f41e0, 0xc000535700, 0xc00052ff40, 0x17f4420, 0xc000535680, 0x0, 0x0)
	  handler.go:35  0xda
golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1.2(0xc000039680, 0xc00054ac60, 0xc000530cb0, 0x17f41e0, 0xc000535700, 0xc00052ff40, 0x17f4420, 0xc000535680)
	  handler.go:103  0x8d
created by golang.org/x/tools/internal/jsonrpc2.AsyncHandler.func1
	  handler.go:100  0x179
[Error - 11:28:42 AM] 

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions