-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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: drop support for building at Go 1.12 #50827
Comments
Change https://golang.org/cl/382075 mentions this issue: |
For golang/go#50827 Change-Id: Ib59aa4431dcc492db9436c19f43872781679f789 Reviewed-on: https://go-review.googlesource.com/c/tools/+/382075 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Change https://golang.org/cl/380555 mentions this issue: |
Go version support Support for Go 1.18 Version 0.8.0 of gopls supports features added to Go 1.18, specifically: Support for multi-module workspaces using go.work files. Diagnostics for Fuzz tests. Improved support for generics. To use these features, gopls must be installed using Go 1.18. See go.dev/dl for the latest status of Go 1.18 -- as of writing Go 1.18 is not yet released, but Go 1.18 RC1 may be used. Dropped support for Go 1.12 Version 0.8.0 of gopls no longer supports building at Go 1.12. See golang/go#50827 for more details. New Features go.work integration Gopls now supports multi-module workspaces using go.work files. To use this feature, create a go.work file that includes the modules you want to work on, and then open your editor to the directory containing go.work. For more information, see the go.work reference, or the gopls documentation for multi-module workspaces. Diagnostics for Fuzz tests When writing Fuzz tests, gopls provides diagnostics for invalid arguments to Fuzz. Improved support for generics Honor the language version configured in go.mod gopls now provides diagnostics for language features based on the go directive in the applicable go.mod file for a package. For some errors related to incompatible language versions, gopls offers a quick-fix to update the go.mod Go version. (note that if the go.mod file is open, it may need to be saved in order for language version changes to take effect) gomodedit Improved completion with type parameters Gopls autocompletion is improved in several contexts when using generic types. genericvarcompl New code action to add missing method stubs Gopls now provides a code action to implement missing methods. Improved performance and accuracy for workspace symbol requests Workspace symbols uses a new fuzzy matcher that is up to 3x faster than previous, and has improved ranking. See golang/go#50016 for more details. Note that the first time workspace symbols are requested, there may be a delay as the symbol cache is populated. Improved gofumpt integration Gopls now sets the language version and module path when invoking gofumpt, allowing more accurate formatting based on context.
Change https://go.dev/cl/401155 mentions this issue: |
Change https://go.dev/cl/401097 mentions this issue: |
Change https://go.dev/cl/401154 mentions this issue: |
As of golang/go#50827, gopls no longer supports building at 1.12, and so usage of golang.org/x/xerrors can be replaced with the native support for error wrapping introduced in Go 1.13. Remove this usage as a step toward eliminating the xerrors dependency from x/tools. For golang/go#52442 Change-Id: Ibf459cc72402a30a6c2735dc620f76ed8a5e2525 Reviewed-on: https://go-review.googlesource.com/c/tools/+/401097 Run-TryBot: Robert Findley <rfindley@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
As of golang/go#50827, gopls no longer needs to build at Go 1.12. I believe this was the only reason to continue using xerrors in go/packages. Remove this usage as a step toward eliminating the xerrors dependency from x/tools. For golang/go#52442 Change-Id: I8f7396491be58606be6a648ebbf2180bdbc907b5 Reviewed-on: https://go-review.googlesource.com/c/tools/+/401154 Run-TryBot: Robert Findley <rfindley@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
As of golang/go#50827, gopls no longer needs to build at Go 1.12. This was the only reason to continue using xerrors in the jsonrpc2 libraries. Remove this usage as a step toward eliminating the xerrors dependency from x/tools. For golang/go#52442 Change-Id: I1a0a1bbf57e6606c66b99b27439adf6f65c26a60 Reviewed-on: https://go-review.googlesource.com/c/tools/+/401155 Run-TryBot: Robert Findley <rfindley@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Bryan Mills <bcmills@google.com>
using golang v1.12.17 with gopls v0.7.5 not working, reporting
|
@Davidrjx did you use The following works for me, from a directory not containing a go.mod file:
But also: go 1.12 is many years old at this point, and has not been supported by the Go team for some time (the Go team currently supports only Go 1.18 and Go 1.19). Is there a reason you cannot use a supported version of Go? |
i was building calico node v3.9.1 and project source contains a go.mod file |
As discovered in CL 380555, some of our dependencies no longer support building with Go 1.12. This is to be expected -- 1.12 was a long time ago.
#50825 outlines a long-term plan to remove support for building gopls at legacy Go versions, but in the meantime we need to to mark gopls@v0.7.5 as the final release supporting being built by Go 1.12. Fortunately, this is consistent with our stated support for the four latest major Go versions.
Action items:
The text was updated successfully, but these errors were encountered: