-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: document why go mod tidy adds entries beyond those added by go build #27633
Comments
You can use
gives:
The reason is that cc @bcmills - I wonder whether we should update the documentation for
Because one reading of the documentation is that |
@myitcv @bcmills related to the documentation comment from @myitcv above, there is also this slightly older issue: #26571 "cmd/go: clarify doc that go commands like 'go build' are not always sufficient to update go.mod and 'go mod -sync' is sometimes required to handle variability due to GOOS/GOARCH/build tags" ...which tries to highlight a few different places where the documentation seems to leave the impression with at least some readers that commands like
That issue #26571 also cites the help for And it is not that the doc is entirely missing the information, e.g., the "Maintaining module requirements" section says:
But there are other pieces of the doc in other sections that seem to imply In short, I agree with @myitcv there is opportunity to clarify the documentation a bit on this topic. |
I believe we can close this now that build acts as if -mod=readonly is set |
What version of Go are you using (
go version
)?go1.11 linux/amd64
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?What did you do?
What did you expect to see?
go mod tidy
doesn't add any new entries togo.mod
.What did you see instead?
An indirect dependency was added:
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e // indirect
The text was updated successfully, but these errors were encountered: