Skip to content
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/cmd/gopls: does not compile at latest #33292

Closed
kingeasternsun opened this issue Jul 26, 2019 · 9 comments
Closed

x/tools/cmd/gopls: does not compile at latest #33292

kingeasternsun opened this issue Jul 26, 2019 · 9 comments

Comments

@kingeasternsun
Copy link

@kingeasternsun kingeasternsun commented Jul 26, 2019

What version of Go are you using (go version)?

$ go version 1.12

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/wdy/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/wdy/pkg:/home/wdy/gitlab/vt/pkg"
GOPROXY="https://goproxy.cn"
GORACE=""
GOROOT="/home/wdy/go"
GOTMPDIR=""
GOTOOLDIR="/home/wdy/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/wdy/gopls/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build158961015=/tmp/go-build -gno-record-gcc-switches"

What did you do?

What did you expect to see?

succeed

What did you see instead?

go get -u -v golang.org/x/tools/gopls@latest
Fetching https://goproxy.cn/golang.org/x/tools/gopls/@v/list
Fetching https://goproxy.cn/golang.org/x/tools/@v/list
Fetching https://goproxy.cn/golang.org/x/sync/@v/list
Fetching https://goproxy.cn/golang.org/x/net/@v/list
Fetching https://goproxy.cn/golang.org/x/text/@v/list
Fetching https://goproxy.cn/golang.org/x/crypto/@v/list
Fetching https://goproxy.cn/golang.org/x/sys/@v/list
go: finding golang.org/x/sync latest
Fetching https://goproxy.cn/golang.org/x/sync/@latest
go: finding golang.org/x/crypto latest
Fetching https://goproxy.cn/golang.org/x/crypto/@latest
go: finding golang.org/x/net latest
Fetching https://goproxy.cn/golang.org/x/net/@latest
go: finding golang.org/x/sys latest
Fetching https://goproxy.cn/golang.org/x/sys/@latest
go: finding golang.org/x/tools latest
Fetching https://goproxy.cn/golang.org/x/tools/@latest
golang.org/x/tools/gopls

golang.org/x/tools/gopls

../pkg/pkg/mod/golang.org/x/tools/gopls@v0.1.3/main.go:20:41: not enough arguments in call to cmd.New
have (string, nil)
want (string, string, []string)

@gopherbot gopherbot added this to the Unreleased milestone Jul 26, 2019
@gopherbot gopherbot added the gopls label Jul 26, 2019
@kingeasternsun
Copy link
Author

@kingeasternsun kingeasternsun commented Jul 26, 2019

not enough arguments in call to cmd.New

@heschik
Copy link
Contributor

@heschik heschik commented Jul 26, 2019

@heschik heschik changed the title x/tools/cmd/gopls: <fill this in> x/tools/cmd/gopls: does not compile at latest Jul 26, 2019
@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Jul 26, 2019

@kingeasternsun: Does the command work without -u? The @latest tag is a specific version, but adding -u gets the master of the dependencies, which could be incompatible.

@ilyakaznacheev
Copy link

@ilyakaznacheev ilyakaznacheev commented Jul 26, 2019

@stamblerre same issue, with and without -u

go get golang.org/x/tools/gopls@latest 
# golang.org/x/tools/gopls
../../../../go/pkg/mod/golang.org/x/tools/gopls@v0.1.3/main.go:20:41: not enough arguments in call to cmd.New
        have (string, nil)
        want (string, string, []string)
@deanveloper
Copy link

@deanveloper deanveloper commented Jul 28, 2019

if you performed the command in a go module, be sure to delete the old dependencies before rerunning go get golang.org/x/tools/gopls@latest. that worked for me.

@ilyakaznacheev
Copy link

@ilyakaznacheev ilyakaznacheev commented Jul 28, 2019

@deanveloper is there a single command to do that?

@deanveloper
Copy link

@deanveloper deanveloper commented Jul 28, 2019

go mod tidy; go get golang.org/x/tools/gopls@latest should work

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Jul 31, 2019

Thanks @deanveloper! Closing this issue.

@stamblerre stamblerre closed this Jul 31, 2019
@toplinuxsir
Copy link

@toplinuxsir toplinuxsir commented Sep 4, 2019

@stamblerre @deanveloper
Not working , still the same error!

@golang golang locked and limited conversation to collaborators Sep 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants
You can’t perform that action at this time.