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

Refactor handling for go-langserver installation #2

Closed
wants to merge 7 commits into from
Closed

Refactor handling for go-langserver installation #2

wants to merge 7 commits into from

Conversation

stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Mar 6, 2020

Remove the code that handled this in the language server installation, and be careful to only install the tool specified by the user. Also, remove some unused import lines in the goLanguageServer.ts file.

Fixes microsoft/vscode-go#3028.

@googlebot googlebot added the cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change. label Mar 6, 2020
@gopherbot
Copy link
Collaborator

This PR (HEAD: 9aa7363) has been imported to Gerrit for code review.

Please visit https://go-review.googlesource.com/c/vscode-go/+/222417 to see it.

Tip: You can toggle comments from me using the comments slash command (e.g. /comments off)
See the Wiki page for more info

@gopherbot
Copy link
Collaborator

Message from Hyang-Ah Hana Kim:

Patch Set 2: Code-Review+2


Please don’t reply on this GitHub thread. Visit golang.org/cl/222417.
After addressing review feedback, remember to publish your drafts!

gopherbot pushed a commit that referenced this pull request Mar 11, 2020
Remove the code that handled this in the language server installation, and be careful to only install the tool specified by the user. Also, remove some unused import lines in the goLanguageServer.ts file.

Fixes microsoft/vscode-go#3028.

Change-Id: I813c39f7d4997b63f7a87c1551de23df2808259c
GitHub-Last-Rev: 9aa7363
GitHub-Pull-Request: #2
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/222417
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
@gopherbot
Copy link
Collaborator

This PR is being closed because golang.org/cl/222417 has been merged.

@gopherbot gopherbot closed this Mar 11, 2020
@stamblerre stamblerre deleted the go-langserver branch March 12, 2020 02:05
if (goConfig['alternateTools']['go-langserver']) {
vscode.window.showErrorMessage(`The "go.alternateTools" setting for "go-langserver" has been deprecated.
Please set "gopls" instead, and then reload the VS Code window.`);
return;
Copy link
Contributor

Choose a reason for hiding this comment

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

If the user had gopls installed in this case, then shouldn't we gracefully switch to that?
And also perhaps add a button to update the settings to remove go-langserver from the alternate tools setting?

Copy link
Contributor

Choose a reason for hiding this comment

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

And if the user didn't had gopls installed, have a button to install gopls?

vscode.window.showErrorMessage(
`Cannot find the language server ${languageServerOfChoice}. Please install it and reload this VS Code window`
`Cannot find the language server ${languageServerOfChoice}. Please install it and reload this VS Code window.`
Copy link
Contributor

Choose a reason for hiding this comment

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

How about updating this to add or use gopls and add a button that will update the alternate tool settings and install gopls if it doesnt exist?

@ramya-rao-a
Copy link
Contributor

The readme would need an update as well.

cc @stamblerre @hyangah

@ramya-rao-a
Copy link
Contributor

Can we re-open this PR? The changes look good. I have added few suggested comments that can be handled in a separate PR

@stamblerre
Copy link
Contributor Author

I contributed the PR to Go Nightly (#2), but I can add those changes to that repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

settings: create one setting to specify an alternate language server
4 participants