-
Notifications
You must be signed in to change notification settings - Fork 47
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
Maintain go.mod and go.sum as part of continuous intergration. #233
Comments
In case of go.mod, I dont think we should do this - we want to use dependencies at a specific commit however if we were to generate go.mod file it will always use dependencies from latest commit. This can introduce breaking changes. |
Why do we want to use dependencies from a specific commit? |
What if a dependency makes a breaking change? we will inherit the breaking change and our software will stop working. This is the reason why go.mod forces you to manually update dependencies. When you add a new dependency it adds the dependency from the last stable commit available at the time of adding the dependency. If new stable releases are available - you must manually update due to the above issue. |
We can write a script to merge the go get github.com/<some commit we want> or just have the CI directly edit the go.mod file. The key is to minimise developer involvement. |
@Sriep @mohsenno1 when can we expect to close this issue? |
agree with @shravanshetty1 this process better left for developers |
go.mod and go.sum are essentially generated files, and as such maintaining them is best left up to the continuous integration process.
Suggestion: Add a Github pull request / merge action that automatically updates these files.
There is a go-mod component to the makefile which might prove useful.
The text was updated successfully, but these errors were encountered: