You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All client module dependencies are included in go.mod top level
The text was updated successfully, but these errors were encountered:
bcmills
changed the title
go vet causes all dependencies of the child module to be added to the parent module
cmd/go: 'go vet' causes all dependencies of the child module to be added to the parent module
May 6, 2020
As a special case, if the package list is a list of .go files from a single directory, the command is applied to a single synthesized package made up of exactly those files, ignoring any build constraints in those files and ignoring any other files in the directory.
When you write go vet client/child_test.go, you are asking the go command to run vet on a synthetic package consisting of only client/chield_test.go, not the package ./client.
Then go vet ends up resolving the dependencies of that synthetic package (because they are not already in your dependency graph), and records the versions used in your go.mod file so that the command you just ran will produce the same results if you run it again.
As far as I can tell this is all working as designed, but CC @jayconrod@matloob in case they disagree.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes for 1.14.2
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
Output of go vet.
Source code is not changed.
What did you see instead?
All client module dependencies are included in go.mod top level
The text was updated successfully, but these errors were encountered: