Skip to content

x/tools/gopls: support using modules in go.work that are outside the workspace directory #52488

Closed
@findleyr

Description

@findleyr

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.

Activity

added this to the gopls/v0.8.4 milestone on Apr 22, 2022
added
ToolsThis label describes issues relating to any tools in the x/tools repository.
goplsIssues related to the Go language server, gopls.
on Apr 22, 2022
added
gopls/workspaceIssues related to support for modules or multi-module workspaces.
on May 10, 2022
findleyr

findleyr commented on Jun 24, 2022

@findleyr
MemberAuthor

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

hyangah

hyangah commented on Jun 30, 2022

@hyangah
Contributor

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

findleyr commented on Jun 30, 2022

@findleyr
MemberAuthor

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

locked and limited conversation to collaborators on Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.gopls/workspaceIssues related to support for modules or multi-module workspaces.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @hyangah@suzmue@gopherbot@findleyr

        Issue actions

          x/tools/gopls: support using modules in go.work that are outside the workspace directory · Issue #52488 · golang/go