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

Migrate from nsf/gocode to mdempsky/gocode for completion results - #1710

Merged
Ramya Rao (ramya-rao-a) merged 1 commit into
microsoft:masterfrom
m90:gocode
Jun 6, 2018
Merged

Migrate from nsf/gocode to mdempsky/gocode for completion results#1710
Ramya Rao (ramya-rao-a) merged 1 commit into
microsoft:masterfrom
m90:gocode

Conversation

@m90

@m90 Frederik Ring (m90) commented Jun 4, 2018

Copy link
Copy Markdown
Contributor

As package nsf/gocode is unmaintaned this is now consuming mdempsky/gocode.
In order to cater for changes, correctly handle empty results and promise
rejections.

This would solve #1645 although for reasons unclear to me, the updated gocode package will not provide any results for members of unimported packages (hence the skipped test case). Don't know if this is a dealbreaker or can be fixed deeper down in goSuggest.ts.

@m90 Frederik Ring (m90) changed the title Migrate from nsf/gocode to mdemspky/gocode for completion results Migrate from nsf/gocode to mdempsky/gocode for completion results Jun 4, 2018
@m90

Frederik Ring (m90) commented Jun 4, 2018

Copy link
Copy Markdown
Contributor Author

Scrap the comment about the test that needs to be skipped, that was an issue I encountered locally as math can actually be an ambiguous package (there is github.com/gohugoio/hugo/tpl/math) and the extension therefore decides to not display anything here: https://github.com/Microsoft/vscode-go/blob/5bc4ce40557a044cd790b9941271908b9135bc68/src/goSuggest.ts#L361-L363

As package nsf/gocode is unmaintaned this is now consuming mdempsky/gocode.
In order to cater for changes, correctly handle empty results and promise
rejections.

@ramya-rao-a Ramya Rao (ramya-rao-a) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, Thanks!

@ramya-rao-a
Ramya Rao (ramya-rao-a) merged commit ce5446c into microsoft:master Jun 6, 2018
@m90
Frederik Ring (m90) deleted the gocode branch June 6, 2018 07:39
@m90

Copy link
Copy Markdown
Contributor Author

Ramya Rao (@ramya-rao-a) Should we also already update the parts of the wiki (this and this) that still point to the nsf gocode or should that wait until it has actually been released?

@ramya-rao-a

Copy link
Copy Markdown
Contributor

Frederik Ring (@m90) Let's wait until the release for the wiki update.

I was wondering if we should prompt the users using Go 1.10 and above to update their gocode if the current one panics. Because otherwise, this change will only help first time installs and those who already have go get the new gocode

@m90

Copy link
Copy Markdown
Contributor Author

From what I understand the mdempsky gocode should work fine on older supported Go versions as well, so ideally a prompt like this would show up for everyone.

Unfortunately I have a hard time coming up with an idea on how to know which gocode is installed on a user's machine as the binary name is the same and it will also be installed into $GOPATH/bin. It looks like the nsf gocode prints slightly different output on gocode -h, but I'm not too sure if this is the most robust way of doing it.

@ramya-rao-a

Copy link
Copy Markdown
Contributor

Ok, In that case, we can leave it as is.
I can update the FAQ to include a note on this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants