src/goMain: remove tools version check hack

The existing tool version checks in suggestUpdates simply compare
the go version & GOROOT/GOPATH used with the tool last time. That is
a hack added when there was no good way to check tool's exact versions
and users organize compatible tools using GOPATH.

Now many of recent tools (e.g. gopls) do not depend on hardcoded
GOROOT or the go version used while compiling the tools. It's still
desirable to compile tools with the latest version of go but the
go version does not have to match exactly with the go version
used to compile the tools. For example, tools compiled with go1.16
can be used to work with go1.16.1 or go1.15.

Now Go is released frequently, and the extension allows users to
switch between different go versions more easily, this incorrect
popup is often annoying and confuses users, than helping users
stay up-to-date with latest tools. Remove this incorrect heuristic
for now.

Updates golang/vscode-go#487
Fixes golang/vscode-go#1698

Change-Id: I7a7c6a0d654ae080ea2bd221a366230ebb98bb7e
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/349752
Trust: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
diff --git a/src/goMain.ts b/src/goMain.ts
index d3b83a0..e465a9a 100644
--- a/src/goMain.ts
+++ b/src/goMain.ts
@@ -873,54 +873,10 @@
 }
 
 async function suggestUpdates(ctx: vscode.ExtensionContext) {
-	const updateToolsCmdText = 'Update tools';
-	interface GoInfo {
-		goroot: string;
-		version: string;
+	// TODO(hyangah): this is to clean up the unused key. Delete this code in 2021 Dec.
+	if (ctx.globalState.get('toolsGoInfo')) {
+		ctx.globalState.update('toolsGoInfo', null);
 	}
-	const toolsGoInfo: { [id: string]: GoInfo } = ctx.globalState.get('toolsGoInfo') || {};
-	const toolsGopath = getToolsGopath() || getCurrentGoPath();
-	if (!toolsGoInfo[toolsGopath]) {
-		toolsGoInfo[toolsGopath] = { goroot: null, version: null };
-	}
-	const prevGoroot = toolsGoInfo[toolsGopath].goroot;
-	const currentGoroot: string = getCurrentGoRoot().toLowerCase();
-	if (prevGoroot && prevGoroot.toLowerCase() !== currentGoroot) {
-		vscode.window
-			.showInformationMessage(
-				`Your current goroot (${currentGoroot}) is different than before (${prevGoroot}), a few Go tools may need recompiling`,
-				updateToolsCmdText
-			)
-			.then((selected) => {
-				if (selected === updateToolsCmdText) {
-					installAllTools(true);
-				}
-			});
-	} else {
-		const currentVersion = await getGoVersion();
-		if (currentVersion) {
-			const prevVersion = toolsGoInfo[toolsGopath].version;
-			const currVersionString = currentVersion.format();
-
-			if (prevVersion !== currVersionString) {
-				if (prevVersion) {
-					vscode.window
-						.showInformationMessage(
-							'Your Go version is different than before, a few Go tools may need re-compiling',
-							updateToolsCmdText
-						)
-						.then((selected) => {
-							if (selected === updateToolsCmdText) {
-								installAllTools(true);
-							}
-						});
-				}
-				toolsGoInfo[toolsGopath].version = currVersionString;
-			}
-		}
-	}
-	toolsGoInfo[toolsGopath].goroot = currentGoroot;
-	ctx.globalState.update('toolsGoInfo', toolsGoInfo);
 }
 
 function configureLanguageServer(ctx: vscode.ExtensionContext) {