[latest] v0.15.1 release
Change-Id: Ied160d7443f20f1eeb7249ccace2199d386d8153
diff --git a/.github/workflows/test-long.yml b/.github/workflows/test-long.yml
index cc10251..1b5f75e 100644
--- a/.github/workflows/test-long.yml
+++ b/.github/workflows/test-long.yml
@@ -10,10 +10,10 @@
build:
name: ${{ matrix.os }} ${{ matrix.version }}
runs-on: ${{ matrix.os }}
-
+
# Not containing 'SKIP CI' in the commit message AND
# (Either non-Windows OR triggered on 'push' (if triggered by 'pull_request', github.base_ref is not empty)
- if: github.repository == 'golang/vscode-go' && !contains(github.event.head_commit.message, 'SKIP CI')"
+ if: github.repository == 'golang/vscode-go' && !contains(github.event.head_commit.message, 'SKIP CI')
timeout-minutes: 20
strategy:
fail-fast: false
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0d97c70..8fa79aa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,14 @@
-## v0.15.0 - 29 June, 2020
+## v0.15.1 - 7th July, 2020
+
+### Enhancement
+
+- Improved `gopls` error report suggestion and changed to send reports to the vscode-go issue tracker instead of the go issue tracker ([cl/240506](https://golang.org/cl/240506)).
+
+### Fixed
+
+- Removed the `preview` note in the published extension ([Issue 273](https://github.com/golang/vscode-go/issues/273)).
+
+## v0.15.0 - 29th June, 2020
### New Features
@@ -15,8 +25,8 @@
- The debug adapter handles errors that can occur during remote connection setup ([cl/237550](https://golang.org/cl/237550), [Issue 215](https://github.com/golang/vscode-go/issue/215)).
- Failed watch expression evaluation no longer pops up error message windows. The error is visible in the watch window instead ([cl/236999](https://golang.org/cl/236999), [Issue 143](https://github.com/golang/vscode-go/issue/143)).
- Better language server integration
- - Restart the language server automatically when changes in its configuration or the language server version are detected ([cl/232598](https://golang.org/cl/232598) [cl/233159](https://golang.org/cl/233159)).
- - Prompts user to file an issue if `gopls` crashes ([cl/233325](https://golang.org/cl/23325)).
+ - Restart the language server automatically when changes in its configuration or the language server version are detected ([cl/232598](https://golang.org/cl/232598), [cl/233159](https://golang.org/cl/233159)).
+ - Prompts user to file an issue if `gopls` crashes ([cl/233325](https://golang.org/cl/233325)).
- `go.gopath`, `go.goroot`, `go.toolsGopath` are now [machine-overridable](https://code.visualstudio.com/api/references/contribution-points#Configuration-property-schema) ([cl/236539](https://golang.org/cl/236539), [Issue 2981](https://github.com/microsoft/vscode-go/issues/2981)).
- The extension does not mutate the `GOROOT` environment variable any more. `go.goroot` is used to select the `go` command under the specified directory ([Issue 146](https://github.com/golang/vscode-go/issue/146)).
- A redundant code action provider was removed when using the language server ([cl/239284](https://golang.org/cl/239284)).
diff --git a/package-lock.json b/package-lock.json
index 9c46b90..ae461af 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "go",
- "version": "0.15.0-dev",
+ "version": "0.15.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/package.json b/package.json
index 0a4b81f..9304797 100644
--- a/package.json
+++ b/package.json
@@ -1,13 +1,12 @@
{
"name": "go",
"displayName": "Go",
- "version": "0.15.0",
+ "version": "0.15.1",
"publisher": "golang",
"description": "Rich Go language support for Visual Studio Code",
"author": {
"name": "Go Team at Google"
},
- "preview": true,
"license": "MIT",
"icon": "images/go-logo-blue.png",
"categories": [
diff --git a/src/goLanguageServer.ts b/src/goLanguageServer.ts
index ae0aee7..03265ee 100644
--- a/src/goLanguageServer.ts
+++ b/src/goLanguageServer.ts
@@ -145,10 +145,9 @@
// language server.
if (!restartCommand) {
restartCommand = vscode.commands.registerCommand('go.languageserver.restart', async () => {
- // TODO(rstambler): Enable this behavior when gopls reaches v1.0.
- if (false) {
- await suggestGoplsIssueReport(`Looks like you're about to manually restart the language server.`);
- }
+ await suggestGoplsIssueReport(
+ `Looks like you're about to manually restart the language server.`,
+ errorKind.manualRestart);
restartLanguageServer();
});
ctx.subscriptions.push(restartCommand);
@@ -197,8 +196,7 @@
vscode.window.showErrorMessage(
`The language server is not able to serve any features. Initialization failed: ${error}. `
);
- serverOutputChannel.show();
- suggestGoplsIssueReport(`The gopls server failed to initialize.`);
+ suggestGoplsIssueReport(`The gopls server failed to initialize.`, errorKind.initializationFailure);
return false;
},
errorHandler: {
@@ -218,8 +216,9 @@
if (crashCount < 5) {
return CloseAction.Restart;
}
- serverOutputChannel.show();
- suggestGoplsIssueReport(`The connection to gopls has been closed. The gopls server may have crashed.`);
+ suggestGoplsIssueReport(
+ `The connection to gopls has been closed. The gopls server may have crashed.`,
+ errorKind.crash);
return CloseAction.DoNotRestart;
},
},
@@ -814,8 +813,23 @@
updateGlobalState(goplsSurveyConfig, JSON.stringify(cfg));
}
+// errorKind refers to the different possible kinds of gopls errors.
+enum errorKind {
+ initializationFailure,
+ crash,
+ manualRestart,
+}
+
// suggestGoplsIssueReport prompts users to file an issue with gopls.
-async function suggestGoplsIssueReport(msg: string) {
+async function suggestGoplsIssueReport(msg: string, reason: errorKind) {
+ // Don't prompt users who manually restart to file issues until gopls/v1.0.
+ if (reason === errorKind.manualRestart) {
+ return;
+ }
+
+ // Show the user the output channel content to alert them to the issue.
+ serverOutputChannel.show();
+
if (latestConfig.serverName !== 'gopls') {
return;
}
@@ -836,18 +850,42 @@
return;
}
}
- const selected = await vscode.window.showInformationMessage(`${msg} Would you like to report a gopls issue ? `, 'Yes', 'Next time', 'Never');
+ const selected = await vscode.window.showInformationMessage(`${msg} Would you like to report a gopls issue on GitHub?
+You will be asked to provide additional information and logs, so PLEASE READ THE CONTENT IN YOUR BROWSER.`, 'Yes', 'Next time', 'Never');
switch (selected) {
case 'Yes':
- // Run the `gopls bug` command directly for now. When
- // https://github.com/golang/go/issues/38942 is
- // resolved, we'll be able to do this through the
- // language client.
+ // Prefill an issue title and report.
+ let errKind: string;
+ switch (reason) {
+ case errorKind.crash:
+ errKind = 'crash';
+ break;
+ case errorKind.initializationFailure:
+ errKind = 'initialization';
+ break;
+ }
+ const title = `gopls: automated issue report (${errKind})`;
+ const body = `ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.
- // Wait for the command to finish before restarting the
- // server, but don't bother handling errors.
- const execFile = util.promisify(cp.execFile);
- await execFile(latestConfig.path, ['bug'], { env: toolExecutionEnvironment() });
+Describe what you observed.
+
+<ANSWER HERE>
+
+Please attach the stack trace from the crash.
+A window with the error message should have popped up in the lower half of your screen.
+Please copy the stack trace from that window and paste it in this issue.
+
+<PASTE STACK TRACE HERE>
+
+OPTIONAL: If you would like to share more information, you can attach your complete gopls logs.
+
+NOTE: THESE MAY CONTAIN SENSITIVE INFORMATION ABOUT YOUR CODEBASE.
+DO NOT SHARE LOGS IF YOU ARE WORKING IN A PRIVATE REPOSITORY.
+
+<OPTIONAL: ATTACH LOGS HERE>
+`;
+ const url = `https://github.com/golang/vscode-go/issues/new?title=${title}&labels=upstream-tools&body=${body}`;
+ await vscode.env.openExternal(vscode.Uri.parse(url));
break;
case 'Next time':
break;