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

cmd/go: go list incorrectly says that can only use path@version syntax with 'go get' #37218

Open
perillo opened this issue Feb 13, 2020 · 2 comments
Milestone

Comments

@perillo
Copy link

@perillo perillo commented Feb 13, 2020

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

$ go version
go version go1.14rc1 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
GO111MODULE="on"
GOARCH="amd64"
GOBIN="/home/manlio/.local/bin"
GOCACHE="/home/manlio/.cache/go-build"
GOENV="/home/manlio/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/manlio/.local/lib/go:/home/manlio/src/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/manlio/sdk/go1.14rc1"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/manlio/sdk/go1.14rc1/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
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-build001001616=/tmp/go-build -gno-record-gcc-switches"
GOROOT/bin/go version: go version go1.14rc1 linux/amd64
GOROOT/bin/go tool compile -V: compile version go1.14rc1
uname -sr: Linux 5.5.2-arch1-1
/usr/lib/libc.so.6: GNU C Library (GNU libc) stable release version 2.31.
gdb --version: GNU gdb (GDB) 9.1

What did you do?

Executing:

go list -json golang.org/x/tools/gopls@v0.3.0

reports the error:

can't load package: package golang.org/x/tools/gopls@v0.3.0: can only use path@version syntax with 'go get'

However the error message is wrong, since path@version can also be used with go list -m and go mod download.

@perillo

This comment has been minimized.

Copy link
Author

@perillo perillo commented Feb 13, 2020

@gopherbot, please add labels GoCommand

@gopherbot gopherbot added the GoCommand label Feb 13, 2020
@bcmills bcmills added the NeedsFix label Feb 14, 2020
@bcmills bcmills added this to the Backlog milestone Feb 14, 2020
@GrigoriyMikhalkin

This comment has been minimized.

Copy link
Contributor

@GrigoriyMikhalkin GrigoriyMikhalkin commented Feb 24, 2020

How about changing message to:
can only use path@version syntax with modules

Would that be clear enough?

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.