Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Go: Ignore Go workspace file go.work
With Go 1.18, support for Go workspaces will land. Go workspaces are configured in `go.work`, which contains paths to local development versions of modules and therefore is not expected to be commited. See: * golang/go#45713
- Loading branch information
fbc053f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is missing
go.work.sum
fbc053f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@robsonpeixoto @breml why would you ignore a go.work and go.work.sum file? If I am working on a project I typically keep them checked in so you can debug individual modules and so gopls works properly when modules are nested. Just trying to learn here as I would think its helpful to other developers to have the go.work setup so they dont have to point each directory on their checked out repo.
fbc053f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davidrenne For more details about the reasoning see the PR: #3884 (comment)
fbc053f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @breml, will read more of the proposal. Perhaps in many of my cases gopls is needing go.work to be configured pointing to other sub modules in order to not be confused. Some of the examples from the proposal talk about doing replacements which obviously are needing to be local paths of a local machine and to be ignored, but there are certainly cases where I think this file is to be checked in so things like vscode can work with multiple modules without the case of a replace.
Have a great week!