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: support using modules in go.work that are outside the workspace directory #52488

Closed
findleyr opened this issue Apr 22, 2022 · 3 comments
Labels
FrozenDueToAge gopls/workspace Issues related to support for modules or multi-module workspaces. gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@findleyr
Copy link
Contributor

Right now there is a fair bit of logic in gopls that relies on having a workspace directory that is a parent of all active modules (for e.g. checking workspace containment).

This is an umbrella issue tracking support for go.work files that use modules in arbitrary directories. We have some related issues (e.g. #48929), but no overarching issue for this feature.

@findleyr findleyr added this to the gopls/v0.8.4 milestone Apr 22, 2022
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Apr 22, 2022
@findleyr findleyr modified the milestones: gopls/v0.8.4, gopls/on-deck May 10, 2022
@suzmue suzmue added the gopls/workspace Issues related to support for modules or multi-module workspaces. label May 10, 2022
@findleyr findleyr modified the milestones: gopls/later, gopls/v0.9.0 May 18, 2022
@findleyr
Copy link
Contributor Author

I believe this should have been fixed by https://go.dev/cl/400822, but we need more testing.

@hyangah
Copy link
Contributor

hyangah commented Jun 30, 2022

Verified gopls recognizes GOWORK=/tmp/go.work. However, changes to the file content (e.g. add/remove modules to the workspace defined by this file) are not yet recognized - gopls is watching only changes in files in the workspace currently.

@findleyr
Copy link
Contributor Author

Thanks, filed https://go.dev/issue/53631 for that. I'll close this issue.

@golang golang locked and limited conversation to collaborators Jun 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls/workspace Issues related to support for modules or multi-module workspaces. gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

4 participants