Open sicko7947 opened 3 years ago
Thanks for the report!
Looks like an issue in a dependency, which will hopefully be resolved soon: https://github.com/sergi/go-diff/issues/89.
We're currently waiting to find out if there will be another release of the go-diff library. If not, we will update to the latest pseudoversion.
Change https://golang.org/cl/275439 mentions this issue: gopls: upgrade github.com/sergi/go-diff to master
Looks like there was a bug in the fix--filed https://github.com/sergi/go-diff/issues/115.
Change https://golang.org/cl/278775 mentions this issue: internal/lsp, gopls: recover from go-diff panics
https://github.com/golang/tools/commit/008e477491be9c24e62b3c1f48f8cbdb28fab4ae causes a compilation failure in
$ GO111MODULE=on go get -u -v golang.org/x/tools/gopls@latest
...
go/pkg/mod/golang.org/x/tools/gopls@v0.6.1/internal/hooks/hooks.go:21:24: cannot use ComputeEdits (type func(span.URI, string, string) []diff.TextEdit) as type diff.ComputeEdits in assignment
...
So I'm assuming that I'm not supposed to use @latest. I'm surprised though, it seems to all be in the same repo...
The issue is the -u
flag which upgrades dependencies to master, even though @latest
does not refer to master. You can see more installation instructions here: https://github.com/golang/tools/blob/master/gopls/doc/user.md#installation. If you are trying to upgrade to master, you can run GO111MODULE=on go get golang.org/x/tools/gopls@master golang.org/x/tools@master
. If you are trying to download the latest gopls
release, you can run GO111MODULE=on go get golang.org/x/tools/gopls@latest
.
Apologies for the noise caused by not fully grokking the installation instructions and just copying from my approach for non-module enabled packages. Thanks a lot for the help, much appreciated.
gopls version: v0.5.4 gopls flags:
ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.
Describe what you observed.