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

Choose Go Environment -> Choose from file browser does not work on Windows #868

Closed
ChrisHines opened this issue Oct 31, 2020 · 1 comment
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@ChrisHines
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.15 windows/amd64
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders
    • 1.50.1
  • Check your installed extensions to get the version of the VS Code Go extension
    • 0.18.0
  • Run go env to get the go development environment details
    • set GO111MODULE=
      set GOARCH=amd64
      set GOBIN=
      set GOCACHE=C:\Users\Chris\AppData\Local\go-build
      set GOENV=C:\Users\Chris\AppData\Roaming\go\env
      set GOEXE=.exe
      set GOFLAGS=
      set GOHOSTARCH=amd64
      set GOHOSTOS=windows
      set GOINSECURE=
      set GOMODCACHE=C:\Users\Chris\Go\pkg\mod
      set GONOPROXY=
      set GONOSUMDB=
      set GOOS=windows
      set GOPATH=C:\Users\Chris\Go
      set GOPRIVATE=
      set GOPROXY=https://proxy.golang.org,direct
      set GOROOT=c:\go
      set GOSUMDB=sum.golang.org
      set GOTMPDIR=
      set GOTOOLDIR=c:\go\pkg\tool\windows_amd64
      set GCCGO=gccgo
      set AR=ar
      set CC=gcc
      set CXX=g++
      set CGO_ENABLED=1
      set GOMOD=
      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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\Chris\AppData\Local\Temp\go-build548893822=/tmp/go-build -gno-record-gcc-switches

Share the Go related settings you have added/edited

"go.useLanguageServer": true,
"[go]": {
	"files.eol": "\n", // formatting only supports LF line endings
	"editor.snippetSuggestions": "none",
	"editor.formatOnSave": true,
	"editor.codeActionsOnSave": {
		"source.organizeImports": true
	}
},
"gopls": {
	"usePlaceholders": true, // add parameter placeholders when completing a function
	"hoverKind": "FullDocumentation", // for documentation in completion items
	// Experimental settings
	"staticcheck": true,
},
"go.testFlags": [
	// "-v",
	"-race",
],
"go.coverOnSingleTest": true,
"go.vetOnSave": "off",
"go.buildOnSave": "off",
"go.installDependenciesWhenBuilding": false,
"go.gotoSymbol.includeGoroot": true,
"go.gotoSymbol.includeImports": true,
"go.coverOnSingleTestFile": true,
"go.formatTool": "goimports",
"go.testTimeout": "2m",
"go.coverMode": "atomic",

Describe the bug

On Windows, manually choosing a go.exe command via the Go Status Bar does not work.

Steps to reproduce the behavior:

Navigate in the UI as follows:

  1. Click the Go Status Bar
  2. Choose Go Environment
  3. Choose from file browser
  4. Pick any valid go.exe binary

See an error window appear reporting, "/C:/Go/bin/go.exe is not an executable"

@hyangah hyangah added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Nov 2, 2020
@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/267898 mentions this issue: src/goEnvironmentStatus: correctly interpret the chosen go path

@hyangah hyangah added the NeedsFix The path to resolution is known, but the work has not been done. label Nov 11, 2020
@hyangah hyangah added this to the v0.19.0 milestone Nov 11, 2020
@golang golang locked and limited conversation to collaborators Nov 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants