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: deprecate the "expandWorkspaceToModule" setting #57514

Open
findleyr opened this issue Dec 29, 2022 · 0 comments
Open

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

findleyr opened this issue Dec 29, 2022 · 0 comments
Labels
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

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

@findleyr findleyr added this to the gopls/v0.12.0 milestone Dec 29, 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 Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

2 participants