[vscode-go] src/goInstallTools.ts: correct spacing in error message on Go not found

29 views
Skip to first unread message

Gerrit Bot (Gerrit)

unread,
Jul 27, 2021, 5:37:40 AM7/27/21
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Gerrit Bot has uploaded this change for review.

View Change

src/goInstallTools.ts: correct spacing in error message on Go not found

- Add space between `.` and `Check`, to fix this error:
<img width="300" alt="Screen Shot 2021-07-27 at 11 02 41 am" src="https://user-images.githubusercontent.com/18750745/127128285-8cbaaaaa-54eb-49eb-b552-a1453e425d6a.png">
- Add empty lines to break up dense code (a lot of lines without spaces) into logical groups.

Change-Id: Ice9b755d8c558c1dec2d30ae9d619c909664336b
GitHub-Last-Rev: 4bd16d8dfe1e9f8e79f14a5d42849a28eeb93152
GitHub-Pull-Request: golang/vscode-go#1651
---
M src/goInstallTools.ts
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/goInstallTools.ts b/src/goInstallTools.ts
index b234b51..515ea4a 100644
--- a/src/goInstallTools.ts
+++ b/src/goInstallTools.ts
@@ -365,6 +365,7 @@
msg = `The ["${tool.name}"](https://github.com/golang/vscode-go/blob/master/docs/dlv-dap.md) command is not available.
Please select "Install", or follow the installation instructions [here](https://github.com/golang/vscode-go/blob/master/docs/dlv-dap.md#updating-dlv-dap).`;
}
+
const selected = await vscode.window.showErrorMessage(msg, ...installOptions);
switch (selected) {
case 'Install':
@@ -591,9 +592,10 @@

async function suggestDownloadGo() {
const msg =
- `Failed to find the "go" binary in either GOROOT(${getCurrentGoRoot()}) or PATH(${envPath}).` +
+ `Failed to find the "go" binary in either GOROOT(${getCurrentGoRoot()}) or PATH(${envPath}). ` +
'Check PATH, or Install Go and reload the window. ' +
"If PATH isn't what you expected, see https://github.com/golang/vscode-go/issues/971";
+
if (suggestedDownloadGo) {
vscode.window.showErrorMessage(msg);
return;
@@ -617,7 +619,9 @@
const goCmd = getBinPath('go');
const tmpDir = await tmpDirForToolInstallation();
const execFile = util.promisify(cp.execFile);
+
let ret: semver.SemVer | null = null;
+
try {
const env = toolInstallationEnvironment();
env['GO111MODULE'] = 'on';
@@ -690,10 +694,12 @@
if (checkForUpdates === 'off') {
return false;
}
+
const { moduleVersion } = await inspectGoToolVersion(toolPath);
if (!moduleVersion) {
return false; // failed to inspect the tool version.
}
+
const localVersion = semver.parse(moduleVersion, { includePrerelease: true });
if (!localVersion) {
// local version can't be determined. e.g. (devel)

To view, visit change 337690. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: vscode-go
Gerrit-Branch: master
Gerrit-Change-Id: Ice9b755d8c558c1dec2d30ae9d619c909664336b
Gerrit-Change-Number: 337690
Gerrit-PatchSet: 1
Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
Gerrit-MessageType: newchange

Gerrit Bot (Gerrit)

unread,
Jul 27, 2021, 7:19:37 AM7/27/21
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Attention is currently required from: Hyang-Ah Hana Kim.

Gerrit Bot uploaded patch set #2 to this change.

View Change

src/goInstallTools.ts: correct spacing in error message on Go not found

- Add space to fix bad message. ").Check PATH" to "). Check PATH".

- Add empty lines to break up dense code (a lot of lines without spaces) into logical groups.

Change-Id: Ice9b755d8c558c1dec2d30ae9d619c909664336b
GitHub-Last-Rev: 4bd16d8dfe1e9f8e79f14a5d42849a28eeb93152
GitHub-Pull-Request: golang/vscode-go#1651
---
M src/goInstallTools.ts
1 file changed, 7 insertions(+), 1 deletion(-)

To view, visit change 337690. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: vscode-go
Gerrit-Branch: master
Gerrit-Change-Id: Ice9b755d8c558c1dec2d30ae9d619c909664336b
Gerrit-Change-Number: 337690
Gerrit-PatchSet: 2
Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
Gerrit-CC: Go Bot <go...@golang.org>
Gerrit-CC: Suzy Mueller <suz...@golang.org>
Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
Gerrit-MessageType: newpatchset

Hyang-Ah Hana Kim (Gerrit)

unread,
Jul 27, 2021, 10:33:07 AM7/27/21
to Gerrit Bot, goph...@pubsubhelper.golang.org, Hyang-Ah Hana Kim, Suzy Mueller, Go Bot, golang-co...@googlegroups.com

Patch set 2:Run-TryBot +1Code-Review +2Trust +1

View Change

1 comment:

To view, visit change 337690. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: vscode-go
Gerrit-Branch: master
Gerrit-Change-Id: Ice9b755d8c558c1dec2d30ae9d619c909664336b
Gerrit-Change-Number: 337690
Gerrit-PatchSet: 2
Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
Gerrit-CC: Go Bot <go...@golang.org>
Gerrit-CC: Suzy Mueller <suz...@golang.org>
Gerrit-Comment-Date: Tue, 27 Jul 2021 14:33:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

kokoro (Gerrit)

unread,
Jul 27, 2021, 10:44:43 AM7/27/21
to Gerrit Bot, goph...@pubsubhelper.golang.org, Hyang-Ah Hana Kim, Suzy Mueller, Go Bot, golang-co...@googlegroups.com

Kokoro presubmit build finished with status: SUCCESS
Logs at: https://source.cloud.google.com/results/invocations/9466412a-6bd4-4188-80c5-ffa008356d9f

Patch set 2:TryBot-Result +1

View Change

    To view, visit change 337690. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: vscode-go
    Gerrit-Branch: master
    Gerrit-Change-Id: Ice9b755d8c558c1dec2d30ae9d619c909664336b
    Gerrit-Change-Number: 337690
    Gerrit-PatchSet: 2
    Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
    Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
    Gerrit-Reviewer: kokoro <noreply...@google.com>
    Gerrit-CC: Go Bot <go...@golang.org>
    Gerrit-CC: Suzy Mueller <suz...@golang.org>
    Gerrit-Comment-Date: Tue, 27 Jul 2021 14:44:39 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    Gerrit-MessageType: comment

    Suzy Mueller (Gerrit)

    unread,
    Jul 27, 2021, 11:37:02 AM7/27/21
    to Gerrit Bot, goph...@pubsubhelper.golang.org, kokoro, Hyang-Ah Hana Kim, Go Bot, golang-co...@googlegroups.com

    Patch set 2:Trust +1

    View Change

      To view, visit change 337690. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: vscode-go
      Gerrit-Branch: master
      Gerrit-Change-Id: Ice9b755d8c558c1dec2d30ae9d619c909664336b
      Gerrit-Change-Number: 337690
      Gerrit-PatchSet: 2
      Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
      Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
      Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
      Gerrit-Reviewer: kokoro <noreply...@google.com>
      Gerrit-CC: Go Bot <go...@golang.org>
      Gerrit-Comment-Date: Tue, 27 Jul 2021 15:36:58 +0000

      Hyang-Ah Hana Kim (Gerrit)

      unread,
      Jul 27, 2021, 2:01:48 PM7/27/21
      to Gerrit Bot, Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Suzy Mueller, kokoro, Go Bot, golang-co...@googlegroups.com

      Hyang-Ah Hana Kim submitted this change.

      View Change

      Approvals: Hyang-Ah Hana Kim: Looks good to me, approved; Trusted Suzy Mueller: Trusted
      src/goInstallTools.ts: correct spacing in error message on Go not found

      - Add space to fix bad message. ").Check PATH" to "). Check PATH".
      - Add empty lines to break up dense code (a lot of lines without spaces) into logical groups.

      Change-Id: Ice9b755d8c558c1dec2d30ae9d619c909664336b
      GitHub-Last-Rev: 4bd16d8dfe1e9f8e79f14a5d42849a28eeb93152
      GitHub-Pull-Request: golang/vscode-go#1651
      Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/337690
      Reviewed-by: Hyang-Ah Hana Kim <hya...@gmail.com>
      Trust: Hyang-Ah Hana Kim <hya...@gmail.com>
      Trust: Suzy Mueller <suz...@golang.org>

      ---
      M src/goInstallTools.ts
      1 file changed, 7 insertions(+), 1 deletion(-)

      2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one.

      To view, visit change 337690. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: vscode-go
      Gerrit-Branch: master
      Gerrit-Change-Id: Ice9b755d8c558c1dec2d30ae9d619c909664336b
      Gerrit-Change-Number: 337690
      Gerrit-PatchSet: 4
      Gerrit-Owner: Gerrit Bot <letsus...@gmail.com>
      Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
      Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
      Gerrit-Reviewer: kokoro <noreply...@google.com>
      Gerrit-CC: Go Bot <go...@golang.org>
      Gerrit-MessageType: merged
      Reply all
      Reply to author
      Forward
      0 new messages