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 help get' should not document the -v flag #37301

Open
perillo opened this issue Feb 19, 2020 · 7 comments
Open

cmd/go: 'go help get' should not document the -v flag #37301

perillo opened this issue Feb 19, 2020 · 7 comments
Labels
Documentation NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@perillo
Copy link
Contributor

perillo commented Feb 19, 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-build166081677=/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.4-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?

go help get is missing the documentation of the -v flag, that is present in go help gopath-get:

The -v flag enables verbose progress and debug output.

Thanks.

@toothrot toothrot added this to the Backlog milestone Feb 19, 2020
@toothrot toothrot added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Feb 19, 2020
@toothrot
Copy link
Contributor

/cc @bcmills @jayconrod

@jayconrod
Copy link
Contributor

The -v flag is not specific to go get in either mode. It's shared with other build commands and documented in go help build. In GOPATH mode, it causes go get to print a couple extra lines, but it doesn't do anything interesting in module mode.

It should probably be removed from go help gopath-get and the summary line of go help module-get. No real need to mention it in either place.

@jayconrod jayconrod changed the title cmd/go: go help get is missing the documentation of the -v flag cmd/go: 'go help get' should not document the -v flag Feb 19, 2020
@perillo
Copy link
Contributor Author

perillo commented Feb 19, 2020

This is not true.

$  GOPROXY=direct go get -v gopkg.in/yaml.v1
get "gopkg.in/yaml.v1": found meta tag get.metaImport{Prefix:"gopkg.in/yaml.v1", VCS:"git", RepoRoot:"https://gopkg.in/yaml.v1"} at //gopkg.in/yaml.v1?go-get=1
go: finding gopkg.in/yaml.v1 latest
go: downloading gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0
go: extracting gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0
gopkg.in/yaml.v1

The documentation of the -v flag for the go build command is

print the names of packages as they are compiled

This means that the -v flag for go get is different.
It doesn't do anything interesting in module mode, only because it uses the proxy by default.

@bcmills
Copy link
Contributor

bcmills commented Feb 19, 2020

@perillo, that output does not appear to be from a Go 1.14 build.

But to the extent that -v prints things beyond compiled packages, it probably should not. (See #23662.)

@bcmills
Copy link
Contributor

bcmills commented Feb 19, 2020

(Specifically, see #23662 (comment).)

@perillo
Copy link
Contributor Author

perillo commented Feb 19, 2020

Seems reasonable, thanks.

There seems to be a proposal about printing network progress, maybe a -vv flag?

@bcmills
Copy link
Contributor

bcmills commented Feb 20, 2020

There seems to be a proposal about printing network progress

That's #15959.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

5 participants