Go: cmd/go: `go mod download` needs a --verbose option

Created on 30 Apr 2020  路  10Comments  路  Source: golang/go

go version 1.13

https://github.com/golang/go/issues/12197

Step 20/32 : RUN go mod download -v
 ---> Running in 06ada58d25d7
flag provided but not defined: -v
usage: go mod download [-json] [modules]
Run 'go help mod download' for details.

WaitingForInfo modules

Most helpful comment

fyi - there is go mod download -x if you want to know what's happening behind.

All 10 comments

Please fill out the complete issue template. What information would you expect go mod download -v to print?

The same info as go install -v :(

go install -v prints each package as it's built. go mod download doesn't work with packages, so it can't really do that.

So what would -v mean here? Print each module when it starts downloading? Show a progress bar? Print other metadata about the modules? It would help if you could give an example.

fyi - there is go mod download -x if you want to know what's happening behind.

i guess worst case scenario, go mod download -v could be an alias for go mod download -x?
On 1.13, I get this:

$ go mod -x download
> go mod -x: unknown command
> Run 'go help mod' for usage.

and

$ go mod download -x
> flag provided but not defined: -x
> usage: go mod download [-json] [modules]
> Run 'go help mod download' for details.

so on 1.13, go mod -x download and go mod download -x don't work

The -x flag was added to go mod download in 1.14 (go mod download -x). Can you try it there and see if it does what you want?

I am stuck on 1.13 for the moment, unfortunately. but there should be a -v flag for both 1.13+ and 1.14+ pls :)

Sorry, our policy is only to backport fixes for security issues, serious problems with no workaround, and documentation fixes. We won't backport -x to 1.13 or 1.14. The freeze for 1.15 begins tomorrow, so there isn't time to add new features for that. So this would be for 1.16 at the earliest.

But we still don't really understand what you want. If you need something different from -x, please say what that is and give an example.

Ultimately I was expecting go mod download -v to print much of the same info that go install -v does, that was all.

go install -v prints each package as it's built. go mod download doesn't work with packages, so it can't really do that.

All module commands print information about modules being downloaded to stderr by default, so it doesn't seem like there's anything else to do here.

Was this page helpful?
0 / 5 - 0 ratings