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 a go work sync
command
#48258
Comments
go mod syncwork
commandgo mod syncwork
command
This proposal has been added to the active column of the proposals project |
Based on the discussion above, this proposal seems like a likely accept. |
With my module author hat on, I definitely agree that this is a problem in need of solving - if one is developing and testing on a workspace, one can easily forget to check if each module individually still works as expected, without the workspace context. I have a slight feeling that this feature is backwards, though. For example, right now I was using a I don't think I would want to use I'm not sure what I would want to use instead, in terms of automation. Presumably, the right way of double checking that the library modules still work outside the workspace is a manual process. Maybe that checking, without editing any go.mod files, could be automated in cmd/go. |
Nit: given https://golang.org/issue/48256 shouldn’t this be go work sync? |
go mod syncwork
commandgo work sync
command
No change in consensus, so accepted. 🎉 |
go work sync
commandgo work sync
command
This is done. |
This issue proposes amending the Workspaces Proposal (#45713) to add a new
go mod syncwork
command.go mod syncwork
would compute the buildlist from the workspace modules, and then sync it back to the workspace modulego.mod
files, setting the versions of any non-workspace modules to the versions in the build list (perhaps also tidying the files afterward). This ensures that the workspace modules use the same set of non-workspace dependencies when they're built outside the workspace.A version of this was suggested by @jayconrod on an issue comment on the Workspaces proposal.
cc @bcmills @ianthehat
The text was updated successfully, but these errors were encountered: