-
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: mod download and go mod tidy conflict (1.16beta1 -> 1.16rc1 regression) #43994
Comments
Workaround golang/go#43994 Run tidy after download
Workaround golang/go#43994 Run tidy after download
In contrast, If |
(Note that lazy loading — #36460 — should bring |
For more details on the impact: all of our CI enforces However, in day to day use its pretty annoying that if I run
I am not sure there is a distinction in practice, but my concern is only about modifying/reverting go.sum - I don't mind if its downloading more or not. |
Could you give some more detail about when you run (As part of #36460 I've been mulling over whether we should add a
Agreed: we expect that a lot of projects will enforce that |
Using There are cases where I want my IDE completion to work, but need the modules first. I suppose I could just run |
For IDE completion, |
The short answer, I think, is that
|
+1 to Bryan's comments. The behavior has changed, but I think the new behavior is correct.
In earlier versions, I think that's the new behavior you're seeing here. I checked out |
According to golang/go#43994 go mod tidy should be used to prime the module cache. Updates #226
According to golang/go#43994 go mod tidy should be used to prime the module cache. Updates #226
According to golang/go#43994 go mod tidy should be used to prime the module cache. Updates #226
According to golang/go#43994 go mod tidy should be used to prime the module cache. Updates #226
With go1.16 thete is a difference between `go mod tidy` and `go mod download`. The `go.sum` is not altered in the same way by both commands. `go mod tidy` must be always called after the `go mod download`. golang/go#43994
With go1.16 there is a difference between `go mod tidy` and `go mod download`. The `go.sum` is not altered in the same way by both commands. `go mod tidy` must be always called after the `go mod download`. golang/go#43994
Note that this behavior was reverted in #45332 which was backported to |
Use go mod tidy instead of go mod download in run-tests. The latter changes go.sum for some reason. See golang/go#43994
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, it is only present in go1.16rc1, and not go1.16beta1
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
On 1.16beta1:
On 1.16rc1:
Repo: https://github.com/istio/api
What did you expect to see?
Either
go mod download
does not add to go.sum, ORgo mod tidy
keeps what is added bygo mod download
. In either case, the two tools should be consistentWhat did you see instead?
go mod download
adds togo.sum
, whichgo mod tidy
removesThe text was updated successfully, but these errors were encountered: