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: list module@version should suggest -m flag #50713

Open
seankhliao opened this issue Jan 20, 2022 · 2 comments
Open

cmd/go: list module@version should suggest -m flag #50713

seankhliao opened this issue Jan 20, 2022 · 2 comments
Labels
GoCommand cmd/go NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@seankhliao
Copy link
Member

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

$ go version
go version devel go1.18-bb7fb8a5fa Wed Jan 19 21:46:55 2022 +0000 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=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/arccy/.cache/go-build"
GOENV="/home/arccy/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/arccy/.data/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/arccy/.data/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/arccy/sdk/gotip"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/arccy/sdk/gotip/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="devel go1.18-bb7fb8a5fa Wed Jan 19 21:46:55 2022 +0000"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
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-build4196401972=/tmp/go-build -gno-record-gcc-switches"

What did you do?

$ go list -f '{{ .Version }}' miniflux.app@686dd92cb9e486c41f407e93d2e10f6b4609f778
package miniflux.app@686dd92cb9e486c41f407e93d2e10f6b4609f778: can only use path@version syntax with 'go get' and 'go install' in module-aware mode

What did you expect to see?

An error message telling me I may have wanted go list -m ...

What did you see instead?

Error message only mentions go get and go install

cc @bcmills @matloob

@seankhliao seankhliao added the GoCommand cmd/go label Jan 20, 2022
@heschi heschi added this to the Go1.19 milestone Jan 20, 2022
@heschi heschi added the NeedsFix The path to resolution is known, but the work has not been done. label Jan 20, 2022
@AGMETEOR
Copy link

AGMETEOR commented Jan 24, 2022

Hello there @bcmills. I would like to work on this.

@gopherbot
Copy link

Change https://golang.org/cl/381195 mentions this issue: cmd/go: better error message for when line having '@'

@gopherbot gopherbot modified the milestones: Go1.19, Go1.20 Aug 2, 2022
@gopherbot gopherbot modified the milestones: Go1.20, Go1.21 Feb 1, 2023
@gopherbot gopherbot modified the milestones: Go1.21, Go1.22 Aug 8, 2023
@gopherbot gopherbot modified the milestones: Go1.22, Go1.23 Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GoCommand cmd/go NeedsFix The path to resolution is known, but the work has not been done.
Projects
Status: No status
Development

No branches or pull requests

4 participants