Skip to content

x/tools/gopls: deprecate the "expandWorkspaceToModule" setting #57514

@findleyr

Description

@findleyr

The expandWorkspaceToModule setting affects the way gopls behaves in surprising ways, and at best works around limitations that can better be addressed otherwise. The word 'workspace' in this setting is ill defined:

  • Does it mean the root of the go command? If so, we should ignore this setting and always choose the best root.
  • Does it mean the directory outside of which to exclude diagnostics / analysis? If so, the setting name is confusing, and anyway it is simpler to always analyze open files (as we do anyway), and always show compiler errors for the entire workspace.
  • Is it a memory optimization? If so, we should endeavor to base this memory optimization on open files, rather than open directories.

In general, I would not expect the user to know how to use this setting. For that reason alone, we should remove it.

CC @adonovan

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/metadataIssues related to metadata loading in gopls

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions