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

vscode-go broken for go Tip #545

Closed
cookieo9 opened this issue Oct 19, 2016 · 7 comments
Closed

vscode-go broken for go Tip #545

cookieo9 opened this issue Oct 19, 2016 · 7 comments

Comments

@cookieo9
Copy link

A recent change added a check https://github.com/Microsoft/vscode-go/blob/06eabf74a200b3fc6486c56ec733317e1328c473/src/goInstallTools.ts#L230 which is based on a regexp match of the output of go version https://github.com/Microsoft/vscode-go/blob/06eabf74a200b3fc6486c56ec733317e1328c473/src/goInstallTools.ts#L213

This check fails for two reasons:

  1. The value could be NULL, since if the regexp match fails the value of goVersion is null, this causes the code to throw an exception
  2. The regexp fails for go version running at tip (example output "go version devel +5a0d50f")

I don't know if it breaks anything else, but I noticed immediately that code completion was broken as a result.

@OneOfOne
Copy link
Contributor

I can confirm this, and it's kind of a major bug.

@roblourens
Copy link
Member

I see the problem. Is this only broken for using development versions of Go, or are there other cases?

Do you know whether there's any way to get a version number out of a dev build?

@cookieo9
Copy link
Author

Off the top of my head, the most reliable way to tell if a compiler supports go 1.6 features is to compile a file with a build rule checking for the go1.6 build tag. It's too bad go env doesn't export the list of default build tags.

In another place in the code, the version value is being checked if it exists before using the fields. The simplest solution would be to do the same to prevent the exception from happening, since the check is only about telling the user to install goMetaLinter manually if they want golint-like features because golint doesn't support go <= 1.5.

@ramya-rao-a
Copy link
Contributor

@cookieo9 @OneOfOne This is now fixed in the latest update 0.6.46 Can you confirm?

@OneOfOne
Copy link
Contributor

@ramya-rao-a yep I can confirm it was fixed, thank you.

@cookieo9
Copy link
Author

@ramya-rao-a Thanks, I'm back up and running too.

@ramya-rao-a
Copy link
Contributor

@cookieo9 @OneOfOne Glad you are unblocked, happy coding!

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

No branches or pull requests

4 participants