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: migrate gopls.mod functionality to go.work #44696
Comments
This is going to be deprecated by the go.work proposal. Renaming appropriately. |
Change https://golang.org/cl/382078 mentions this issue: |
Change https://golang.org/cl/382114 mentions this issue: |
Change https://golang.org/cl/382115 mentions this issue: |
Change https://golang.org/cl/382235 mentions this issue: |
Change https://golang.org/cl/382241 mentions this issue: |
Gopls was using an old version of workfile support in x/mod that did not support the 'use' syntax. Upgrade to x/mod@master, and update tests accordingly. For golang/go#44696 Change-Id: I87841cd1322d7b1aa0fbc929838746ea600bee77 Reviewed-on: https://go-review.googlesource.com/c/tools/+/382078 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> Reviewed-by: Michael Matloob <matloob@golang.org> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Remove some duplication in the construction of cache.workspace instances. For golang/go#44696 Change-Id: Ic955fa3f9a574781f627c550694f0b87ad2013e1 Reviewed-on: https://go-review.googlesource.com/c/tools/+/382114 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> Reviewed-by: Michael Matloob <matloob@golang.org> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
This CL fixes a several bugs in workspace invalidation: - When invalidating the workspace due to a change in gopls.mod or go.work files, we should not update the workspace if the change does not parse. There was a comment to this effect, but it was not properly implemented. - Check go.work before gopls.mod, consistent with our intitial workspace load. - If we get an 'unchanged' change (such as a save) to go.work, don't continue looking for gopls.mod. A regression test that inadvertently relied on our mishandling of broken go.work files is updated to have the correct syntax. A new regtest expectation is added to assert on a clean workspace. For golang/go#44696 Change-Id: I2b7e739573e225cadfbf8cc892a0b5daf0191e40 Reviewed-on: https://go-review.googlesource.com/c/tools/+/382115 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> Reviewed-by: Michael Matloob <matloob@golang.org> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Remove the workspace_metadata command, as VS Code no longer needs this to run workspace commands (it can use go.work instead). Updates golang/go#44696 Change-Id: Ife579a15e64969c4301e4508e18b7c8a8b633b9f Reviewed-on: https://go-review.googlesource.com/c/tools/+/382235 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
When using go 1.18 with go.work files, don't fake workspaces by creating a workspace module: just run from the workspace root and pass -workfile. For golang/go#44696 Change-Id: Iaa1979d26b1ce67c6e18e0bf26546a504069da8c Reviewed-on: https://go-review.googlesource.com/c/tools/+/382241 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> Reviewed-by: Michael Matloob <matloob@golang.org> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
This is essentially done now. We have other issues for go.work support. |
If we intend for people to check these files in, the paths should be relative.
The text was updated successfully, but these errors were encountered: