cmd/go: 'go mod tidy' should retain go.sum entries for the module graph with and without replacements #29182
Labels
FrozenDueToAge
modules
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Today,
go mod tidy
trimsgo.mod
andgo.sum
to just what is needed when building the main module as viewed from inside that module.However, in many cases users of the module will build from outside that module (especially given #24250). Builds from outside may need additional modules to satisfy the imports as seen from outside, and may need to check sums for those additional modules as well (see #28802).
go mod tidy
should ensure that both views of the module are complete and reproducible. That is, it should include enough requirements to satisfy the transitive import graph in both views (and regardless of build tags).(A flag to compute only the outside view, as in #24666, would not suffice:
go mod tidy
using only an outside view could lead to missing requirements for builds from inside the module.)The text was updated successfully, but these errors were encountered: