Skip to content
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: add documentation for go.work.sum #51941

Closed
samherrmann opened this issue Mar 25, 2022 · 7 comments
Closed

cmd/go: add documentation for go.work.sum #51941

samherrmann opened this issue Mar 25, 2022 · 7 comments
Labels
Documentation NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@samherrmann
Copy link

samherrmann commented Mar 25, 2022

With the release of Go 1.18, we now have workspaces. From my findings, workspaces appear to be documented in the following locations:

None of these locations however make mention of the go.work.sum file. The go.work.sum file was however described in the proposal.

This issue is to bring the description of the go.work.sum file from the proposal into the official documentation.

@seankhliao seankhliao changed the title go/cmd: Add documentation for go.work.sum cmd/go: Add documentation for go.work.sum Mar 25, 2022
@mknyszek
Copy link
Contributor

CC @matloob

@mknyszek mknyszek added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Mar 25, 2022
@mknyszek mknyszek changed the title cmd/go: Add documentation for go.work.sum cmd/go: add documentation for go.work.sum Mar 25, 2022
@mknyszek mknyszek added this to the Backlog milestone Mar 25, 2022
@codyoss
Copy link
Member

codyoss commented May 16, 2023

I recently added go.work to a large project and another maintainer asked me about the sum file and it left me a bit clueless as well. Seems oddly missing from https://go.dev/ref/mod#workspaces

@mvrahden
Copy link

I agree, a little piece of documentation on the purpose of this file and its insides would be great.

@MarianMacik
Copy link

I also came across a few situations where the go.work.sum file changes seemingly for no reason, even shrinking in size despite new modules were added to the workspace. So I would appreciate some documentation about its purpose.

@calebschoepp
Copy link

I also came across a few situations where the go.work.sum file changes seemingly for no reason, even shrinking in size despite new modules were added to the workspace. So I would appreciate some documentation about its purpose.

I've been really struggling with this myself. My go.work.sum seems to be constantly changing. I don't understand the purpose of it, why its changing, and whether it is something I should track in git.

@gopherbot
Copy link

Change https://go.dev/cl/563855 mentions this issue: _content/ref/mod: document go.work.sum files

@matloob
Copy link
Contributor

matloob commented Feb 13, 2024

I sent out CL 563855 to add documentation to golang.org/ref/mod, which seems to be the best place for it.

@calebschoepp Usually go.work files shouldn't be checked in, so go.work.sum files shouldn't be checked in either. But if you are checking in your go.work file it makes sense to check in the go.work.sum file for consistency for the same reason that a go.sum is checked in: to guarantee that others doing a build in your repo are getting the same results. Maybe we could add a line about that to the text proposed for 53502.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

9 participants