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: mitigate merge conflicts when modules are updated #32485
Comments
CC @jayconrod |
I'd be interested in writing git specific merge driver for go.sum, if anyone else is thinking of the same thing. |
Thinking about this some more... if the area under the merge tokens contains a |
what about just deleting go.sum and running |
@rbUUbr, the point of the |
It seems to me like the algorithm should be: Also I think a nice interface would be something like "go mod git-merge" or something like that. It could return an error exit code when it wasn't able to safely auto-merge everything. I think this could be plugged into .git/config so that doing a huge rebase with hundreds of commits would be mostly automatic. |
Hasn't been much movement on this issue, but I thought I'd throw in my vote for this feature. For what it's worth, I think this would be useful even if it only handled In this case, the workflow would be: resolve conflicts in |
I expect merge conflicts in
go.mod
andgo.sum
to be a relatively common occurrence.Quoting from @bcmills in the Go Slack:
https://gophers.slack.com/archives/C9BMAAFFB/p1559923453042900?thread_ts=1559922004.041700&cid=C9BMAAFFB
This doesn't appear terribly burdensome but it does introduce friction in the development process. I'm opening this as an exploratory issue to investigate whether there's anything the tooling can/should do to mitigate the conflict.
My off the cuff question was whether
go mod tidy
could be updated to understand conflicts and automatically resolve them ingo.mod
andgo.sum
. My summary of the resulting conversation is that it's likely possible but it's unclear whether it's desirable.Some of the reasons against that were brought up:
It's possible there's a less invasive approach to mitigating conflicts so I'm including the above suggestion only as one potential option to explore.
The text was updated successfully, but these errors were encountered: