cmd/go: "mod tidy" doesn't delete go.sum when go.mod has no dependencies #49772
Labels
FrozenDueToAge
GoCommand
cmd/go
modules
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
It's not really a big deal, but I occasionally find myself having to manually delete
go.sum
files after removing all external dependencies from a project.Steps to Reproduce
go mod vendor
go.sum
has been createdgo mod tidy
go.sum
file is now empty.Conversely, if you had never added an external dependency and executed
go mod vendor
,go.sum
would have never been created, and the following error would have been displayed instead:go: no dependencies to vendor
go/src/cmd/go/internal/modcmd/vendor.go
Lines 190 to 193 in 1ac45e0
The text was updated successfully, but these errors were encountered: