cmd/go: go get -u
on main module bloats go.mod with unnecessary dependencies
#33102
Labels
go get -u
on main module bloats go.mod with unnecessary dependencies
#33102
What did you do?
Consider this simple test app:
go.mod
is also pretty simple:Lets try to update this app dependencies by running
go get -u -d
, resultinggo.mod
will look as follows:Now let's try
go mod tidy
if it's possible to remove some redundant dependencies:What did you expect to see?
Result of running
go get -u -d
should match correspondinggo mod tidy
on updated dependencies ingo.mod
, or match those lines ingo.mod
being updated according to documented behavior ofgo get -u
without adding any additional indirect dependencies.What did you see instead?
go.mod
is bloated with indirect dependencies, forcing user to rungo mod tidy
additionally, or edit it manually.System details
The text was updated successfully, but these errors were encountered: