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

Choice of wrong binary from "Choose Go Environment" breaks the extension permanently #864

Closed
hyangah opened this issue Oct 30, 2020 · 1 comment
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@hyangah
Copy link
Contributor

hyangah commented Oct 30, 2020

0.18.0 introduced the file explorer option with which users can select the go binary to use.
It does some basic check on the binary (i.e. whether the version subcommand is accepted), accepts the user's selection, and stores the info in the workspace Memento. If the binary is an invalid go binary, this leaves the extension. In that state, Go: Choose Go Environment command fails - users even can't clear the bad value from the workspace Memento.

How to reproduce

  • Select the file explorer from the option
  • Select a binary that has 'version' subcommand, e.g. gopls or dlv or a simple shell script.
  • Reload the window

Current workaround

  • Reinstall 'code'.

What we want

  • We shouldn't fail miserably like this - at least users should be able to reset the memento.
  • Enhance validation logic running after users select the go binary.
@hyangah hyangah added the NeedsFix The path to resolution is known, but the work has not been done. label Oct 30, 2020
@hyangah hyangah changed the title go.environment.choose: choice of wrong go binary breaks the extension permanently Choice of wrong binary from "Choose Go Environment" breaks the extension permanently Oct 30, 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 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.
Projects
None yet
Development

No branches or pull requests

2 participants