-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: module project cannot update go.sum file in readonly mode #34054
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
Comments
This change was an intentional bug-fix: see #25530 (comment) and #30667.
|
Could you share more detail about your use-case for using |
I don’t believe our go.mod file is incomplete, go mod tidy makes no changes. How can I help answer this question?
… On 4 Sep 2019, at 11:49, Bryan C. Mills ***@***.***> wrote:
Could you share more detail about your use-case for using -mod=readonly with an incomplete go.mod file?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
If the behavior difference is purely that 1.12 would create a |
That is correct. When we moved to modules we found the sum file was constantly dirty, this broke our ci caching and caused lots of turds in pull requests.
#31978 suggested that go.sum was not required, perhaps that advice should be revised for projects building in readonly mode (again to stop unintended go.mod changes in pull requests)
… On 4 Sep 2019, at 13:16, zikaeroh ***@***.***> wrote:
If the behavior difference is purely that 1.12 would create a go.sum if not present with -mod=readonly specified, and 1.13 doesn't, then it might be noteworthy that the repo linked in the issue has go.sum in its .gitignore, so it wouldn't exist in a fresh checkout or CI and would now fail with -mod=readonly regardless of go.mod's completeness.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
(Sorry, I typo'd |
The purpose of the If the developers have run tests in all applicable configurations, or have run |
A |
I have encountered a similar issue. I'm not sure why the different Go versions produce different |
There are now at least two prominent locations where we advise to check in the https://blog.golang.org/using-go-modules:
http://golang.org/wiki/Modules#should-i-commit-my-gosum-file-as-well-as-my-gomod-file:
|
Given the above documentation, and the fact that the current behavior seems to align with its intent (per #30667), I don't think there is anything more to be done here. If you find further documentation that needs to be updated, or if you find that the (At the moment #33008 is the only such issue I am aware of.) |
#33784 is another known source of spurious |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
In attempting to upgrade my project from Go 1.12 to Go 1.13 our project will not build because
-mod=readonly
wants to update thego.sum
file but is prevented from doing so by its own logic.Go 1.12 happily made whatever changes were necessary to the sum file,
What did you expect to see?
Build succeeds
What did you see instead?
Project, https://github.com/heptio/contour
The text was updated successfully, but these errors were encountered: