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

Closed
findleyr opened this issue Dec 29, 2022 · 1 comment
Closed

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

findleyr opened this issue Dec 29, 2022 · 1 comment
Labels
gopls/metadata Issues related to metadata loading in gopls 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
@findleyr findleyr modified the milestones: gopls/v0.12.0, gopls/v0.13.0 Apr 25, 2023
@adonovan adonovan added the gopls/metadata Issues related to metadata loading in gopls label Aug 31, 2023
@gopherbot
Copy link

Change https://go.dev/cl/534919 mentions this issue: gopls: deprecate "tempModfile" and "expandWorkspaceToModule" settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gopls/metadata Issues related to metadata loading in gopls 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

3 participants