-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Closed
Labels
FeatureRequestIssues asking for a new feature that does not need a proposal.Issues asking for a new feature that does not need a proposal.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.modules
Milestone
Description
Maintainers of large projects will often want to ensure that their module definitions are both complete and minimal at commit time (example: #27643 (comment)).
go mod tidy is the obvious command to verify that a definition is complete and minimal, but it makes changes even when -mod=readonly is set (#26850). As far as I am aware, there is no way to verify (nondestructively) that a definition is minimal — only that it is complete (go list all -mod=readonly), and even then only subject to the current GOOS, GOARCH, and build tags.
If we decide not to change the behavior of go mod tidy -mod=readonly, I think it's important that we provide some other command that would be suitable for use in a commit hook (along the lines of gofmt -l).
kaedys, iand, kubastick, dmitshur and SlyMarbo
Metadata
Metadata
Assignees
Labels
FeatureRequestIssues asking for a new feature that does not need a proposal.Issues asking for a new feature that does not need a proposal.FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.modules