-
Notifications
You must be signed in to change notification settings - Fork 645
golang.org/x/tools/gopls version need to update #2886
Comments
this line should have a problem as the // https://github.com/microsoft/vscode-go/blob/e936903d648caa40f4bbc7a6d0e28aeb59aedd43/src/goLanguageServer.ts#L402
const defaultLatestVersion = semver.coerce('0.1.7');
const defaultLatestVersionTime = moment('2019-09-18', 'YYYY-MM-DD');
async function shouldUpdateLanguageServer(tool: Tool, path: string, makeProxyCall: boolean): Promise<boolean> {
// Only support updating gopls for now.
if (tool.name !== 'gopls') {
return false;
}
// First, run the "gopls version" command and parse its results.
// If "gopls" is so old that it doesn't have the "gopls version" command,
// or its version doesn't match our expectations, prompt the user to download.
const usersVersion = await goplsVersion(path);
if (!usersVersion) {
return true;
}
// We might have a developer version. Don't make the user update.
if (usersVersion === '(devel)') {
return false;
}
// Get the latest gopls version.
let latestVersion = makeProxyCall ? await latestGopls(tool) : defaultLatestVersion;
|
workaround# install gopls separately
go get golang.org/x/tools/[email protected] |
@ramya-rao-a: I believe that #2877 will fix this issue. The problem is that if multiple packages installed depend on different versions of x/tools, the temporary |
0.11.9 has been published with the fix by @stamblerre in #2877 |
@AlphaWong Can you share if the fix in the latest version helps? |
I check my vscode and find that my current version is 0.11.8 |
@ramya-rao-a it works. Thx community! |
The golang package version has been updated
original (v0.1.7)
latest
Library
original (v0.1.7)
latest
The text was updated successfully, but these errors were encountered: