[vscode-go] all: add setting to disable test explorer

109 views
Skip to first unread message

Ethan Reesor (Gerrit)

unread,
Sep 15, 2021, 6:41:01 PM9/15/21
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Ethan Reesor has uploaded this change for review.

View Change

all: add setting to disable test explorer

Change-Id: Iabbca677d2d86d48ddfec52ce4216bd0b57b1527
---
M docs/settings.md
M package.json
M src/goMain.ts
3 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/docs/settings.md b/docs/settings.md
index 62dafd1..5f34fdc 100644
--- a/docs/settings.md
+++ b/docs/settings.md
@@ -403,6 +403,11 @@
Concatenate all test log messages for a given location into a single message.

Default: `true`
+### `go.testExplorer.enable`
+
+Enable the Go test explorer
+
+Default: `true`
### `go.testExplorer.packageDisplayMode`

Present packages in the test explorer flat or nested.<br/>
diff --git a/package.json b/package.json
index 529651e..f5b744e 100644
--- a/package.json
+++ b/package.json
@@ -1302,6 +1302,12 @@
"description": "Flags to pass to `go test`. If null, then buildFlags will be used. This is not propagated to the language server.",
"scope": "resource"
},
+ "go.testExplorer.enable": {
+ "type": "boolean",
+ "default": true,
+ "scope": "window",
+ "description": "Enable the Go test explorer"
+ },
"go.testExplorer.packageDisplayMode": {
"type": "string",
"enum": [
diff --git a/src/goMain.ts b/src/goMain.ts
index eddba07..30fd73a 100644
--- a/src/goMain.ts
+++ b/src/goMain.ts
@@ -336,7 +336,7 @@
})
);

- if (isVscodeTestingAPIAvailable) {
+ if (isVscodeTestingAPIAvailable && cfg.get<boolean>('testExplorer.enable')) {
GoTestExplorer.setup(ctx);
}

@@ -531,6 +531,15 @@
// TODO: actively maintain our own disposables instead of keeping pushing to ctx.subscription.
}
}
+ if (e.affectsConfiguration('go.testExplorer.enable')) {
+ const msg =
+ 'Go test explorer has been enabled or disabled. For this change to take effect, the window must be reloaded.';
+ vscode.window.showInformationMessage(msg, 'Reload').then((selected) => {
+ if (selected === 'Reload') {
+ vscode.commands.executeCommand('workbench.action.reloadWindow');
+ }
+ });
+ }
})
);


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

Gerrit-Project: vscode-go
Gerrit-Branch: master
Gerrit-Change-Id: Iabbca677d2d86d48ddfec52ce4216bd0b57b1527
Gerrit-Change-Number: 350157
Gerrit-PatchSet: 1
Gerrit-Owner: Ethan Reesor <ethan....@gmail.com>
Gerrit-MessageType: newchange

Ethan Reesor (Gerrit)

unread,
Sep 15, 2021, 6:43:11 PM9/15/21
to goph...@pubsubhelper.golang.org, Hyang-Ah Hana Kim, Suzy Mueller, golang-co...@googlegroups.com

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

View Change

1 comment:

  • Patchset:

    • Patch Set #1:

      In the future, I plan to improve the UX around this setting so the user doesn't have to reload the window for it to take effect, but I wanted to make this CL as simple as possible.

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

Gerrit-Project: vscode-go
Gerrit-Branch: master
Gerrit-Change-Id: Iabbca677d2d86d48ddfec52ce4216bd0b57b1527
Gerrit-Change-Number: 350157
Gerrit-PatchSet: 1
Gerrit-Owner: Ethan Reesor <ethan....@gmail.com>
Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
Gerrit-CC: Suzy Mueller <suz...@golang.org>
Gerrit-Attention: Hyang-Ah Hana Kim <hya...@gmail.com>
Gerrit-Comment-Date: Wed, 15 Sep 2021 22:43:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment

Hyang-Ah Hana Kim (Gerrit)

unread,
Sep 15, 2021, 7:28:45 PM9/15/21
to Ethan Reesor, goph...@pubsubhelper.golang.org, Hyang-Ah Hana Kim, Suzy Mueller, golang-co...@googlegroups.com

Attention is currently required from: Ethan Reesor.

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

View Change

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

    Gerrit-Project: vscode-go
    Gerrit-Branch: master
    Gerrit-Change-Id: Iabbca677d2d86d48ddfec52ce4216bd0b57b1527
    Gerrit-Change-Number: 350157
    Gerrit-PatchSet: 1
    Gerrit-Owner: Ethan Reesor <ethan....@gmail.com>
    Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
    Gerrit-CC: Suzy Mueller <suz...@golang.org>
    Gerrit-Attention: Ethan Reesor <ethan....@gmail.com>
    Gerrit-Comment-Date: Wed, 15 Sep 2021 23:28:40 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    Gerrit-MessageType: comment

    Suzy Mueller (Gerrit)

    unread,
    Sep 15, 2021, 7:34:52 PM9/15/21
    to Ethan Reesor, goph...@pubsubhelper.golang.org, kokoro, Hyang-Ah Hana Kim, golang-co...@googlegroups.com

    Attention is currently required from: Ethan Reesor.

    Patch set 1:Trust +1

    View Change

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

      Gerrit-Project: vscode-go
      Gerrit-Branch: master
      Gerrit-Change-Id: Iabbca677d2d86d48ddfec52ce4216bd0b57b1527
      Gerrit-Change-Number: 350157
      Gerrit-PatchSet: 1
      Gerrit-Owner: Ethan Reesor <ethan....@gmail.com>
      Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
      Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
      Gerrit-CC: kokoro <noreply...@google.com>
      Gerrit-Attention: Ethan Reesor <ethan....@gmail.com>
      Gerrit-Comment-Date: Wed, 15 Sep 2021 23:34:50 +0000

      Suzy Mueller (Gerrit)

      unread,
      Sep 15, 2021, 7:35:13 PM9/15/21
      to Ethan Reesor, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, kokoro, Hyang-Ah Hana Kim, golang-co...@googlegroups.com

      Suzy Mueller submitted this change.

      View Change


      Approvals: Hyang-Ah Hana Kim: Looks good to me, approved; Trusted; Run TryBots Suzy Mueller: Trusted
      all: add setting to disable test explorer

      Change-Id: Iabbca677d2d86d48ddfec52ce4216bd0b57b1527
      Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/350157
      Reviewed-by: Hyang-Ah Hana Kim <hya...@gmail.com>
      Trust: Hyang-Ah Hana Kim <hya...@gmail.com>
      Trust: Suzy Mueller <suz...@golang.org>
      Run-TryBot: Hyang-Ah Hana Kim <hya...@gmail.com>

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

      Gerrit-Project: vscode-go
      Gerrit-Branch: master
      Gerrit-Change-Id: Iabbca677d2d86d48ddfec52ce4216bd0b57b1527
      Gerrit-Change-Number: 350157
      Gerrit-PatchSet: 2
      Gerrit-Owner: Ethan Reesor <ethan....@gmail.com>
      Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
      Gerrit-Reviewer: Suzy Mueller <suz...@golang.org>
      Gerrit-CC: kokoro <noreply...@google.com>
      Gerrit-MessageType: merged

      Hyang-Ah Hana Kim (Gerrit)

      unread,
      Sep 15, 2021, 7:40:05 PM9/15/21
      to goph...@pubsubhelper.golang.org, Ethan Reesor, Hyang-Ah Hana Kim, golang-co...@googlegroups.com

      Hyang-Ah Hana Kim has uploaded this change for review.

      View Change

      [release] all: add setting to disable test explorer


      Change-Id: Iabbca677d2d86d48ddfec52ce4216bd0b57b1527
      Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/350157
      Reviewed-by: Hyang-Ah Hana Kim <hya...@gmail.com>
      Trust: Hyang-Ah Hana Kim <hya...@gmail.com>
      Trust: Suzy Mueller <suz...@golang.org>
      Run-TryBot: Hyang-Ah Hana Kim <hya...@gmail.com>
      (cherry picked from commit 20812b7aa7f5901b788fed776c240e40997ab0de)

      ---
      M docs/settings.md
      M package.json
      M src/goMain.ts
      3 files changed, 21 insertions(+), 1 deletion(-)

      diff --git a/docs/settings.md b/docs/settings.md
      index 62dafd1..5f34fdc 100644
      --- a/docs/settings.md
      +++ b/docs/settings.md
      @@ -403,6 +403,11 @@
      Concatenate all test log messages for a given location into a single message.

      Default: `true`
      +### `go.testExplorer.enable`
      +
      +Enable the Go test explorer
      +
      +Default: `true`
      ### `go.testExplorer.packageDisplayMode`

      Present packages in the test explorer flat or nested.<br/>
      diff --git a/package.json b/package.json
      index 2f52ca9..e0607f3 100644
      --- a/package.json
      +++ b/package.json
      @@ -1301,6 +1301,12 @@

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

      Gerrit-Project: vscode-go
      Gerrit-Branch: release
      Gerrit-Change-Id: Iabbca677d2d86d48ddfec52ce4216bd0b57b1527
      Gerrit-Change-Number: 350146
      Gerrit-PatchSet: 1
      Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
      Gerrit-CC: Ethan Reesor <ethan....@gmail.com>
      Gerrit-MessageType: newchange

      Hyang-Ah Hana Kim (Gerrit)

      unread,
      Sep 15, 2021, 7:40:20 PM9/15/21
      to Ethan Reesor, Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

      Patch set 1:Run-TryBot +1

      View Change

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

        Gerrit-Project: vscode-go
        Gerrit-Branch: release
        Gerrit-Change-Id: Iabbca677d2d86d48ddfec52ce4216bd0b57b1527
        Gerrit-Change-Number: 350146
        Gerrit-PatchSet: 1
        Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
        Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
        Gerrit-CC: Ethan Reesor <ethan....@gmail.com>
        Gerrit-Comment-Date: Wed, 15 Sep 2021 23:40:16 +0000

        Hyang-Ah Hana Kim (Gerrit)

        unread,
        Sep 15, 2021, 7:41:39 PM9/15/21
        to Ethan Reesor, Hyang-Ah Hana Kim, goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

        Hyang-Ah Hana Kim abandoned this change.

        View Change

        Abandoned just realized why I didn't do merge. :-(

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

        Gerrit-Project: vscode-go
        Gerrit-Branch: release
        Gerrit-Change-Id: Iabbca677d2d86d48ddfec52ce4216bd0b57b1527
        Gerrit-Change-Number: 350146
        Gerrit-PatchSet: 1
        Gerrit-Owner: Hyang-Ah Hana Kim <hya...@gmail.com>
        Gerrit-Reviewer: Hyang-Ah Hana Kim <hya...@gmail.com>
        Gerrit-CC: Ethan Reesor <ethan....@gmail.com>
        Gerrit-MessageType: abandon
        Reply all
        Reply to author
        Forward
        0 new messages