Closed
Description
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.
Metadata
Metadata
Assignees
Labels
Type
Projects
Relationships
Development
No branches or pull requests
Activity
gopls imports
not work for module defined in "go.work" #52784findleyr commentedon Jun 24, 2022
I believe this should have been fixed by https://go.dev/cl/400822, but we need more testing.
hyangah commentedon 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 commentedon Jun 30, 2022
Thanks, filed https://go.dev/issue/53631 for that. I'll close this issue.