gitignore
gitignore copied to clipboard
Ignore go.work.sum
Reasons for making this change:
As the go.work
file is excluded, the go.work.sum
file, which is generated based on the go.work
file, should be excluded, too.
Also mentioned in https://github.com/github/gitignore/commit/fbc053fe49d7f3b4a882ddf9651fc60f8954db21#commitcomment-73352144
Links to documentation supporting these rule changes:
Currently there isn't much documentation regarding go.work.sum
(see https://github.com/golang/go/issues/51941), the only thing I can refer to is the proposal, which suggests to not check in the go.work
file.
To further support these changes, here are some examples for popular repos ignoring go.work.sum
:
https://github.com/hashicorp/nomad/pull/13193
https://github.com/gravitational/teleport/pull/12098
https://github.com/sourcegraph/sourcegraph/pull/36049
Why not **go.sum
?
The sum file is used to check locally, I think.
Why not
**go.sum
? The sum file is used to check locally, I think.
Typically your module's go.sum file should be committed along with your go.mod file.
@avelino, @Nirusu will this get merged?
I'm in favor of this change - if go.work
is ignored, then go.work.sum
should also be ignored. Note that there's not actually a recommendation or even consensus on whether these files should be ignored. My read on the situation is that for cases like a monorepo, you probably do want to commit these files but in many other situations, you do not. See the discussion at https://github.com/golang/go/issues/53502.
@bdougie, could you please take a look at this PR since you already merged #3884? The file mentioned here is a checksum file that is autogenerated, and present iif go.work
file is present in the local repository. Since go.work
is ignored, we should ignore go.work.sum
files as well.
Hey there, I noticed that the PR is already approved. is there an estimated timeframe for when it might be merged? Just curious and looking forward to it
I think those gray check marks indicate that the approvals are by developers who are not CODEOWNERS. I don't even see a merge button!