Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/go: go list should default to not modify go.mod and not exit non-zero when skipping go.mod update #41328
What version of Go are you using (
Since Russ wrote #40728, I'm hopeful this will be fixed in 1.16.
I still did analysis as this means the situation won't be better for another 6 months. None of the flag combination helps, they all misbehave in a way or another on go1.15.2. So even if the other issue is fixed, there should be better flag coherency in
The following commands were run within fuchsia.git/tools:
None of the behavior is satisfactory.
With -e only:
Wth -mod=readonly only:
Both -e -mod=readonly:
@maruel, if you want fine-grained control over the outputs of
Ok. So what changes to the
We can reasonably make
We could perhaps allow
Important note: go.sum is not tracked by git; I added it to .gitignore since we use a meta-checkout tool and use replace statements. We use replace statements to use the local versions: https://fuchsia.googlesource.com/fuchsia/+/master/tools/go.mod
That said the only thing we want is that
I don't think -e should be used. I think the fix should be that -mod=readonly should not complain if a newer minor version is available.
This has nothing to do with whether a newer minor version is available. (The point of Go Modules is to provide reproducibility, not recency:
I have a guess: you say you “use a meta-checkout tool and use replace statements”. Does the meta-checkout tool invoke
So the easy fix here is to check in a