src/goLanguageServer: always check the version before crash report

For dev-version, we still not enforce update (this case should be
clear enough to tell apart from the gopls version included in the
issue report and is valuable to detect crash report during dev
period).

And
 - Add go version used by the extension and the update flag info.
 - Update gopls latestVersion to v0.6.8.

Updates golang/vscode-go#1300
Updates golang/vscode-go#1334
Updates golang/vscode-go#1338

Change-Id: I9965297b164665056dbec68285eb740ec2908f01
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/302832
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/goInstallTools.ts b/src/goInstallTools.ts
index 79a9bd6..197d6e4 100644
--- a/src/goInstallTools.ts
+++ b/src/goInstallTools.ts
@@ -277,8 +277,7 @@
 		const execFile = util.promisify(cp.execFile);
 		const { stdout, stderr } = await execFile(goBinary, args, opts);
 		output = `${stdout} ${stderr}`;
-		logVerbose('install: %s %s\n%s%s', goBinary, args.join(' '), stdout, stderr);
-
+		logVerbose(`install: ${goBinary} ${args.join(' ')}\n${stdout}${stderr}`);
 		if (hasModSuffix(tool) || tool.name === 'dlv-dap') {
 			// Actual installation of the -gomod tool and dlv-dap is done by running go build.
 			const gopath = env['GOBIN'] || env['GOPATH'];
diff --git a/src/goLanguageServer.ts b/src/goLanguageServer.ts
index ee68ab9..3d2adfc 100644
--- a/src/goLanguageServer.ts
+++ b/src/goLanguageServer.ts
@@ -1008,9 +1008,13 @@
 	return vscode.workspace.workspaceFolders.find((x) => tempGopath !== getCurrentGoPath(x.uri)) ? false : true;
 }
 
-export async function shouldUpdateLanguageServer(tool: Tool, cfg: LanguageServerConfig): Promise<semver.SemVer> {
+export async function shouldUpdateLanguageServer(
+	tool: Tool,
+	cfg: LanguageServerConfig,
+	mustCheck?: boolean
+): Promise<semver.SemVer> {
 	// Only support updating gopls for now.
-	if (tool.name !== 'gopls' || cfg.checkForUpdates === 'off' || IsInCloudIDE) {
+	if (tool.name !== 'gopls' || (!mustCheck && (cfg.checkForUpdates === 'off' || IsInCloudIDE))) {
 		return null;
 	}
 
@@ -1488,7 +1492,7 @@
 	// just prompt them to update, not file an issue.
 	const tool = getTool('gopls');
 	if (tool) {
-		const versionToUpdate = await shouldUpdateLanguageServer(tool, latestConfig);
+		const versionToUpdate = await shouldUpdateLanguageServer(tool, latestConfig, true);
 		if (versionToUpdate) {
 			promptForUpdatingTool(tool.name, versionToUpdate, true);
 			return;
@@ -1567,6 +1571,7 @@
 				// Get the user's version in case the update prompt above failed.
 				const usersGoplsVersion = await getLocalGoplsVersion(latestConfig);
 				const extInfo = getExtensionInfo();
+				const goVersion = await getGoVersion();
 				const settings = latestConfig.flags.join(' ');
 				const title = `gopls: automated issue report (${errKind})`;
 				const goplsLog = sanitizedLog
@@ -1583,7 +1588,9 @@
 				const body = `
 gopls version: ${usersGoplsVersion}
 gopls flags: ${settings}
+update flags: ${latestConfig.checkForUpdates}
 extension version: ${extInfo.version}
+go version: ${goVersion?.format(true)}
 environment: ${extInfo.appName} ${process.platform}
 initialization error: ${initializationError}
 manual restart count: ${manualRestartCount}
diff --git a/src/goTools.ts b/src/goTools.ts
index d6708eb..ff921c6 100644
--- a/src/goTools.ts
+++ b/src/goTools.ts
@@ -427,10 +427,10 @@
 		description: 'Language Server from Google',
 		usePrereleaseInPreviewMode: true,
 		minimumGoVersion: semver.coerce('1.12'),
-		latestVersion: semver.coerce('0.6.6'),
-		latestVersionTimestamp: moment('2021-02-22', 'YYYY-MM-DD'),
-		latestPrereleaseVersion: semver.coerce('0.6.6'),
-		latestPrereleaseVersionTimestamp: moment('2021-02-22', 'YYYY-MM-DD')
+		latestVersion: semver.coerce('0.6.8'),
+		latestVersionTimestamp: moment('2021-03-17', 'YYYY-MM-DD'),
+		latestPrereleaseVersion: semver.coerce('0.6.8'),
+		latestPrereleaseVersionTimestamp: moment('2021-03-17', 'YYYY-MM-DD')
 	},
 	'dlv': {
 		name: 'dlv',