Skip to content

x/tools/gopls: consider avoiding the workspace/configuration request #57329

@findleyr

Description

@findleyr

Right now, gopls uses the workspace/configuration request to resolve configuration of workspace folders.

As described in #54559 (comment), it is odd to manage configuration server-side, when all other session state is managed client-side. Furthermore, as described in microsoft/language-server-protocol#972, the workspace/configuration request poses problems for clients, as they need to specialize to various servers.

IIUC, the only reason gopls makes workspace/configuration requests is to support different settings for different workspace folders. In particular, this allows for different sets of build tags per folder, which is a workaround for lacking build tag support in gopls (#29202). I'm not sure whether anyone is actually using this workaround.

We should investigate if we can change gopls' configuration model to simply rely on initialization options and didChangeConfiguration payloads.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions