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: add better logging for go mod vendor #51446

Open
rittneje opened this issue Mar 2, 2022 · 3 comments
Open

cmd/go: add better logging for go mod vendor #51446

rittneje opened this issue Mar 2, 2022 · 3 comments
Labels
GoCommand modules NeedsInvestigation
Milestone

Comments

@rittneje
Copy link

@rittneje rittneje commented Mar 2, 2022

Today when we run go mod vendor, we only get a single message printed to stderr per dependency that looks like go: downloading golang.org/x/text v0.3.7.

This does not tell us when the package finished downloading, which is especially important when trying to diagnose why go mod vendor is slow. (Since go mod vendor seems to download lots of stuff in parallel, we cannot just go by the next log line.)

It also does not tell us which particular proxy in the GOPROXY list was used, which is again important for troubleshooting.

Please add the aforementioned logs, perhaps via some -verbose flag or similar.

@gopherbot gopherbot added this to the Proposal milestone Mar 2, 2022
@seankhliao seankhliao changed the title proposal: cmd/go: add better logging for go mod vendor cmd/go: add better logging for go mod vendor Mar 2, 2022
@seankhliao seankhliao added GoCommand NeedsInvestigation and removed Proposal labels Mar 2, 2022
@seankhliao
Copy link
Contributor

@seankhliao seankhliao commented Mar 2, 2022

related #26152 #39728

@ianlancetaylor ianlancetaylor removed this from the Proposal milestone Mar 2, 2022
@ianlancetaylor ianlancetaylor added this to the Backlog milestone Mar 2, 2022
@bcmills bcmills added the modules label Mar 3, 2022
@ianling
Copy link

@ianling ianling commented Mar 8, 2022

Sorry if this is too tangential for this issue, but is there a reason why this stuff all logs to stderr instead of stdout? These informational messages are not errors.

Same with the messages that come up after a go get run : https://github.com/golang/go/blob/master/src/cmd/go/internal/modget/get.go#L1692

@rittneje
Copy link
Author

@rittneje rittneje commented Mar 9, 2022

@ianling Typically, stdout is for the actual output of a command (which tends to be more stable for parsing, etc.), while stderr is used for logging (not just error messages). Not all commands abide by this though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GoCommand modules NeedsInvestigation
Projects
None yet
Development

No branches or pull requests

6 participants