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/gopls: can't install @latest #33464

Closed
ilovelili opened this issue Aug 5, 2019 · 4 comments
Closed

x/tools/gopls: can't install @latest #33464

ilovelili opened this issue Aug 5, 2019 · 4 comments

Comments

@ilovelili
Copy link

@ilovelili ilovelili commented Aug 5, 2019

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

$ go version
go1.12.6 linux/amd64

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/min/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/min/Projects/dongfeng"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/min/Projects/dongfeng/src/github.com/ilovelili/dongfeng-core/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-build261873378=/tmp/go-build -gno-record-gcc-switches"

What did you do?

go get golang.org/x/tools/gopls@latest

What did you expect to see?

Get gopls installed

What did you see instead?

golang.org/x/tools/gopls
../../../../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)
@agnivade agnivade changed the title can't install latest x/tools/gople: can't install @latest Aug 5, 2019
@gopherbot gopherbot added this to the Unreleased milestone Aug 5, 2019
@agnivade agnivade changed the title x/tools/gople: can't install @latest x/tools/gopls: can't install @latest Aug 5, 2019
@gopherbot gopherbot added the gopls label Aug 5, 2019
@stamblerre

This comment has been minimized.

Copy link
Contributor

@stamblerre stamblerre commented Aug 5, 2019

Sounds like you have a more recent version of x/tools installed than @latest expects. Can you try deleting the old dependencies by running go mod tidy and then try running go get golang.org/x/tools/gopls@latest again?

@0ostreamo0

This comment has been minimized.

Copy link

@0ostreamo0 0ostreamo0 commented Aug 6, 2019

Sounds like you have a more recent version of x/tools installed than @latest expects. Can you try deleting the old dependencies by running go mod tidy and then try running go get golang.org/x/tools/gopls@latest again?

have the same problem, and run go mod tidy not working

image

while.... works fine by remoming '-u' 🤣

@stamblerre

This comment has been minimized.

Copy link
Contributor

@stamblerre stamblerre commented Aug 6, 2019

@0ostreamo0: -u updates all of your dependencies to master, so it would not work with @latest. It would update the x/tools dependency to a version that is past the version expected by gopls@latest. go get golang.org/x/tools/gopls@latest is the correct way to run the command, as specified on the wiki page: https://github.com/golang/go/wiki/gopls.

@ilovelili

This comment has been minimized.

Copy link
Author

@ilovelili ilovelili commented Aug 6, 2019

@stamblerre Thanks Rebecca that worked for me. I will close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

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