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

Include the link to release note/package overview in the update prompt, and update gopls default version #3041

Merged
merged 3 commits into from
Mar 16, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/goInstallTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,11 +361,18 @@ export async function promptForUpdatingTool(toolName: string) {
}
const goVersion = await getGoVersion();
const updateMsg = `Your version of ${tool.name} appears to be out of date. Please update for an improved experience.`;
vscode.window.showInformationMessage(updateMsg, 'Update').then((selected) => {
const choices: string[] = ['Update'];
if (toolName === `gopls`) {
ramya-rao-a marked this conversation as resolved.
Show resolved Hide resolved
choices.push('Release Notes'); // TODO(hyangah): pass more info such as version, release note location.
}
vscode.window.showInformationMessage(updateMsg, ...choices).then((selected) => {
switch (selected) {
case 'Update':
installTools([tool], goVersion);
break;
case 'Release Notes':
vscode.commands.executeCommand('vscode.open', vscode.Uri.parse('https://github.com/golang/go/issues/33030#issuecomment-510151934'));
break;
default:
declinedUpdates.push(tool);
break;
Expand Down