-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: incorrect sum for replaced module in either 'mod tidy' or 'mod vendor' #27868
Comments
In addition, I get the following error when running
Please let me know if I should file a second issue for that. |
The delta appears within diff --git a/go.sum b/go.sum
index 1d2e68e..034fb23 100644
--- a/go.sum
+++ b/go.sum
@@ -26,7 +26,6 @@ github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtb
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
-github.com/sourcegraph/zoekt v0.0.0-20180925141536-852b3842c11d h1:82xTRg5XBKlVsvLvgcgQzcG54AFTYhS2DdMVT5U5AWw=
github.com/sourcegraph/zoekt v0.0.0-20180925141536-852b3842c11d/go.mod h1:f1Qnbu4glSRTb9A/H7qLv4AhudFf3eStkDbpyb21KYQ=
github.com/src-d/gcfg v1.3.0/go.mod h1:p/UMsR43ujA89BJY9duynAwIpvqEujIH/jFlfL7jWoI=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= |
FWIW, I'm manually editing go.sum multiple times per day on a (soon to be, large, probably popular) open source project to work around this issue. During a user test today I also spoke with someone who said they were sticking with go1.10 because they had a bad experience with Go modules. |
I never run |
I'm having an issue with I have a |
@thepudds asked on Slack to post the samples of go.sum - attaching 3 files: |
Look at the number of lines in
The single line for "Fix" this using
and check again:
Run
It doesn't; hence we conclude The "fix" here could involve the use of any |
@bcmills - do you (or anyone from the Go team) agree that |
maybe as a workaround it would be possible for |
@dmitris, I'm planning to investigate this for 1.12 during the freeze. If the fix is not too invasive, it should make the 1.12 release. |
Change https://golang.org/cl/153817 mentions this issue: |
Signed-off-by: Sylvain Rabot <[email protected]>
The correct content was generated with Go 1.12beta2. `go mod tidy` should not be run using previous versions of Go. See golang/go#27868 for context.
Signed-off-by: Pierre Fenoll <[email protected]>
Please answer these questions before submitting your issue. Thanks!
What did you do?
Clone the repo at https://github.com/kevinburke/go-mod-nondeterministic.
Running
GO111MODULE=on go mod tidy
modifies go.sum.Running
GO111MODULE=on go mod vendor
changes go.sum back to the original value.What did you expect to see?
I expect
go.sum
to reach a steady state at some point, where further command invocations make no changes to the file.What did you see instead?
go.sum
changes after running each ofgo mod tidy
andgo mod vendor
. There's no "steady state" since the file state depends on the last command that was run.Does this issue reproduce with the latest release (go1.11)?
Yes
System details
The text was updated successfully, but these errors were encountered: