Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

extension does not eager load when workspace contains .go files #2821

Closed
theryansmith opened this issue Oct 8, 2019 · 4 comments · Fixed by #2859
Closed

extension does not eager load when workspace contains .go files #2821

theryansmith opened this issue Oct 8, 2019 · 4 comments · Fixed by #2859

Comments

@theryansmith
Copy link

theryansmith commented Oct 8, 2019

The extension does not load on activationEvent ""workspaceContains:**/.go"

This means users loading a workspace containing go files need to open a .go file, or run specific go commands before they can build the workspace.

Steps to Reproduce:

  1. close all vscode instances
  2. open a workspace that has .go files, ensure that the default state does not focus on a .go code file
  3. try to ctrl-shift-p->"Go: Build Workspace"
  4. Notice that it fails because the extension is not loaded

Possible solution: Modify package.json to include the workspaceContains event:
"activationEvents": [
"workspaceContains:**/.go",
"onLanguage:go",
"onCommand:go.gopath",
"onCommand:go.tools.install",
"onDebugResolve:go"
],

@ramya-rao-a
Copy link
Contributor

Fair point, thanks for reporting!

PRs to add this feature is most welcome.

@aykejriw
Copy link

@ramya-rao-a I want to work on this.

@ramya-rao-a
Copy link
Contributor

Sorry @aykejriw
There was an open PR for this in (#2859) that I just now approved and merged

@ramya-rao-a
Copy link
Contributor

The latest version of this extension (0.12.0) has this feature now.

Thanks to @theryansmith for reporting and to @zmb3 for the PR :)

Happy Coding!

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants