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: print information about version changes #33284

Open
rogpeppe opened this issue Jul 25, 2019 · 4 comments
Open

cmd/go: print information about version changes #33284

rogpeppe opened this issue Jul 25, 2019 · 4 comments

Comments

@rogpeppe
Copy link
Contributor

@rogpeppe rogpeppe commented Jul 25, 2019

Currently, the go command is quite chatty when it downloads and extracts module data, but it doesn't print the information that I really want to see - how resolved versions have changed.

For example, if I run go get $module, it may upgrade the version of the module, but it doesn't tell me what version it ended up with, or that other dependencies have changed version as a result.
Running go get $module@$version can downgrade dependencies too, which is silent and might break expectations of available features.

It would be great if the go command could show some information whenever the resolved module version has changed.

@bcmills @jayconrod

@rogpeppe rogpeppe added the modules label Jul 25, 2019
@bcmills bcmills added this to the Go1.14 milestone Jul 25, 2019
@bcmills

This comment has been minimized.

Copy link
Member

@bcmills bcmills commented Jul 25, 2019

We should do this in conjunction with the fix for #26152. We can prune down the fetch-spam for modules already in the build list, and add logging for changes to that list.

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Nov 1, 2019

Change https://golang.org/cl/204777 mentions this issue: cmd/go: adjust module-related logging

gopherbot pushed a commit that referenced this issue Nov 1, 2019
Suppress “finding” messages unless they are unusually slow, and
“extracting” messages always (they almost always occur conjunction
with “downloading”, which is already logged).

Log “found” messages for module dependencies added to satisfy missing
import paths.

Log top-level version changes in 'go get' when the selected version
is not identical to the version requested on the command line.

Updates #26152
Updates #33284

Change-Id: I4d0de60fab58d7cc7df8a2aff05c8b5b2220e626
Reviewed-on: https://go-review.googlesource.com/c/go/+/204777
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
@bcmills

This comment has been minimized.

Copy link
Member

@bcmills bcmills commented Nov 5, 2019

@rogpeppe, I think this is resolved. Once the tree is a bit less unstable, please try out the new log statements and let us know if we've missed anything.

@bcmills bcmills closed this Nov 5, 2019
@bcmills

This comment has been minimized.

Copy link
Member

@bcmills bcmills commented Dec 19, 2019

Hmm, there is one more source of version changes that we should probably log.

If the go.mod file specifies some version explicitly, and we are forced to upgrade that version due to a requirement found in some transitive dependency already present in the go.mod file, we should give a log line indicating the upgraded version and the transitive dependency that forces it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.