[go-completer] update gopls version and support go install
blackb1rd opened this issue · 1 comments
blackb1rd commented
when build YCM with --go-completer, it's building error with following:
go get: installing executables with 'go get' in module mode is deprecated.
To adjust and download dependencies of the current module, use 'go get -d'.
To install using requirements of the current module, use 'go install'.
To install ignoring the current module, use 'go install' with a version,
like 'go install example.com/cmd@latest'.
For more information, see https://golang.org/doc/go-get-install-deprecation
or run 'go help get' or 'go help install'.
My go version
go version
go version go1.17.1 linux/amd64
the document said:
https://github.com/golang/tools/blob/master/gopls/doc/advanced.md#installing-unreleased-versions
# For go1.17 or older, the above `go get` command will build and
# install `gopls`. For go1.18+ or tip, run the following command to install
# using selected versions in go.mod.
go install golang.org/x/tools/gopls
However, it would be better to support new command as go install
To solve this problem for me change get
-> install
but it would break backward-compatible:
Line 830 in a7b972b
bstaletic commented
it would break backward-compatible
Exactly why we haven't done that yet. Latest ubuntu LTS is only at 1.14 and that one won't work with go install
.