-
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: go.work.sum after go work sync
is missing entries needed by go list
#63901
Comments
What was the actual |
Just plain "go list" (I've included the full reproducer above). "go test" also suffices, and probably other commands too. |
Hmm. So, I wouldn't expect I agree that (CC @matloob) |
go work sync
is missing entries needed by go list
I've been running into this and I think things are a bit more sinister than just missing entries. We have a workspace with two modules (A & B) and I see different behavior depending on the order in which I run things. In my case, I have a module 1. Running
|
Been doing some more testing and ran into a scenario where |
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?
I ran the following testscript script:
What did you expect to see?
A passing test, or at least either
go mod tidy
orgo work sync
should have updated thego.work.sum
file.What did you see instead?
The
go.work.sum
file was updated as a result of runninggo list
, not either of the two previous commands (go mod tidy
andgo work sync
).If I go into the
cmd/ocisrv
directory and rungo mod tidy
, itsgo.sum
file does change (but note: this was not because any code or dependencies have changed in that directory), but there's no easy way to rungo mod tidy
on all modules in a repository, so it's easy to run into annoying CI failures this way.I think that after running
go work sync
, allgo.mod
,go.sum
andgo.work.sum
files should be consistent and not change when running other normal go commands likego list
.The text was updated successfully, but these errors were encountered: