-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: go.mod should not be changed when building #32196
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
When using
So i need to run without IMHO readonly should be the default behavior |
Have you tried searching the issue tracker before filing an issue? For example, see #29118. |
@Nightapes if you haven't already, probably worth reading https://golang.org/cmd/go/#hdr-Maintaining_module_requirements for an overview of how it works today, which includes:
|
One option for you might be From the documentation:
|
@thepudds Thanks, i will try it with the |
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?
go.mod
main.go
Run
go build
What did you expect to see?
go.mod should not be changed
What did you see instead?
go.mod was changed, the version from k8s.io/api changed from
k8s.io/api kubernetes-1.14.2
tok8s.io/api v0.0.0-20190516230258-a675ac48af67
which is bad. You don't see the version anymore.Also the indirect dependencies are added, they should be only in go.sum.
go build should be in read only mode for go.mod and error if a dependency is missing
The text was updated successfully, but these errors were encountered: