-
Notifications
You must be signed in to change notification settings - Fork 752
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src/goInstallTools: stop requiring to install legacy tools
...if the language server is enabled. Furthermore, mark dlv and gopls as important tools, so 'offerToInstallTools' don't drop them from missing tools list. And minor bug fix in choosing the go binary used for tool installation. For tools installation, we are currently trying to find the go binary from the current GOROOT. In practice, the extension computes the current GOROOT early on during its activation. But that may fail, and in tests that skips activation, we can't make the same assumption. So, add a fallback - if the current goroot isn't set yet, use the goVersion's bin path. Corner case: It's possible that the language server is enabled from the configuration but the extension fails to start the language server for some reason, and falls back to the legacy mode. Since I don't know exactly when this getConfiguredTools will get invoked (before language server started, after it started or failed, or some other random moment by users' action), I feel less confident about using the current language server's runtime status. A better solution would be - before falling back to the legacy mode silently - we should notify users of this fallback with the explanation, so users address the underlying issues that prevented the language server start. Fixes #51 Change-Id: I9d5bf5b8ff59678d8c4ae8f6206e50bb40315329 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/276556 Trust: Hyang-Ah Hana Kim <hyangah@gmail.com> Trust: Suzy Mueller <suzmue@golang.org> Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
- Loading branch information
Showing
4 changed files
with
92 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters