Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/gopls: create a file watch for GOWORK value, if outside of the workspace. #53631

Closed
findleyr opened this issue Jun 30, 2022 · 2 comments
Assignees
Labels
gopls/workspace gopls Tools
Milestone

Comments

@findleyr
Copy link
Contributor

findleyr commented Jun 30, 2022

In order to receive changes to a go.work file that is outside of the workspace, but referenced by the GOWORK environment variable, gopls needs to ask clients to create a file watch.

@findleyr findleyr added this to the gopls/v0.9.1 milestone Jun 30, 2022
@gopherbot gopherbot added Tools gopls labels Jun 30, 2022
@findleyr findleyr changed the title x/tools/gopls: create file watcher for GOWORK value, if outside of the workspace. x/tools/gopls: create a file watch for GOWORK value, if outside of the workspace. Jun 30, 2022
@findleyr findleyr modified the milestones: gopls/v0.9.1, gopls/v0.9.2 Jul 13, 2022
@findleyr findleyr added the gopls/workspace label Jul 14, 2022
@findleyr findleyr self-assigned this Aug 5, 2022
@gopherbot
Copy link

gopherbot commented Aug 5, 2022

Change https://go.dev/cl/421500 mentions this issue: internal/lsp/cache: track explicit go.work files outside the workspace

@gopherbot
Copy link

gopherbot commented Aug 5, 2022

Change https://go.dev/cl/421501 mentions this issue: internal/lsp/cache: register a file watcher for explicit GOWORK values

gopherbot pushed a commit to golang/tools that referenced this issue Aug 8, 2022
In order to correctly process changes to the go.work file, the workspace
must know about GOWORK settings configured in the users environment.
Compute this when initializing the view, and thread this through to the
workspace.

At this point, workspace information is spread around in a few places.
Add some TODOs to clean this up.

Also remove some module data that was not used in
TestBrokenWorkspace_DuplicateModules.

Updates golang/go#53631

Change-Id: Ie0577d702c8a229304387bc7fe53a8befb544acb
Reviewed-on: https://go-review.googlesource.com/c/tools/+/421500
Reviewed-by: Suzy Mueller <suzmue@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gopls/workspace gopls Tools
Projects
None yet
Development

No branches or pull requests

2 participants