Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: 'go mod tidy' should retain go.sum entries for the module graph with and without replacements #29182

Open
bcmills opened this issue Dec 12, 2018 · 0 comments
Labels
Milestone

Comments

@bcmills
Copy link
Member

@bcmills bcmills commented Dec 12, 2018

Today, go mod tidy trims go.mod and go.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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.