From b92b631791468aa83e38341b8a6296d528492f3c Mon Sep 17 00:00:00 2001 From: Tim Humphries Date: Fri, 21 Mar 2025 14:21:50 +1100 Subject: [PATCH] vscode-go: add option to disable tool recompilation prompts --- extension/package.json | 8 +++++++- extension/src/goInstallTools.ts | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/extension/package.json b/extension/package.json index 2233693e8f..ef822cd174 100644 --- a/extension/package.json +++ b/extension/package.json @@ -1558,6 +1558,12 @@ "description": "Automatically update the tools used by the extension, without prompting the user.", "scope": "resource" }, + "go.toolsManagement.warnOutdated": { + "type": "boolean", + "default": true, + "description": "Warn the user if the tools used by the extension appear outdated, or are not regular Go binaries. This has no effect if `go.toolsManagement.autoUpdate` is true.", + "scope": "resource" + }, "go.enableCodeLens": { "type": "object", "properties": { @@ -2852,4 +2858,4 @@ } ] } -} \ No newline at end of file +} diff --git a/extension/src/goInstallTools.ts b/extension/src/goInstallTools.ts index f914043201..644ad62956 100644 --- a/extension/src/goInstallTools.ts +++ b/extension/src/goInstallTools.ts @@ -822,7 +822,7 @@ export async function suggestUpdates() { const toolsManagementConfig = getGoConfig()['toolsManagement']; if (toolsManagementConfig && toolsManagementConfig['autoUpdate'] === true) { installTools(toolsToUpdate, configuredGoVersion, { silent: true }); - } else { + } else if (toolsManagementConfig && toolsManagementConfig['warnOutdated'] === true) { const updateToolsCmdText = 'Update tools'; const selected = await vscode.window.showWarningMessage( `Tools (${toolsToUpdate.map((tool) => tool.name).join(', ')}) need recompiling to work with ${