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

Go Modules #106

Merged
merged 1 commit into from
Mar 26, 2019
Merged

Go Modules #106

merged 1 commit into from
Mar 26, 2019

Conversation

jeremyje
Copy link
Contributor

@jeremyje jeremyje commented Mar 13, 2019

This change will pin Open Match dependencies to predictable versions. This will allow for more reproducible builds since go get pulls code from repository HEAD, with the exception of aliased repos like gopkg.in.

After looking at go modules and vendoring it turns out the vendor/ directory is not touched if you build with go mod.

The recommended way is to just check in the go.mod and go.sum files to pin your dependencies to a known good checkout and download the dependencies one time.

The dependency output will be copied to $GOPATH/pkg/mod.

This change will set the minimum golang version for Open Match to 1.11. 1.12 is the latest version, 1.13 will turn go mod on by default.

For now you'll need to add this to your ~/.bashrc

export GO111MODULE=on

@jeremyje jeremyje requested a review from calebatwd March 13, 2019 20:25
@jeremyje
Copy link
Contributor Author

#91 is the related issue for this.

Copy link
Contributor

@sawagh sawagh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might help to update the devdocs (or some other discoverable location from the project landing page on github) with the build process subtleties (turning on GO111MODULE, checking the repo out in a specific path etc.) Need not do as a part of this CL but would definitely love to see that at 0.4.0 cut - I can dogfood the instructions if you want.

Also, how were the go.mod and go.sum generated? Do these get auto updated when we need to change the pinned dependency version? If we need to run some tool to do so, can you add that to the documentation too?

@jeremyje jeremyje removed the request for review from calebatwd March 26, 2019 18:08
@jeremyje jeremyje merged commit f79b782 into googleforgames:040wip Mar 26, 2019
@jeremyje jeremyje deleted the vendoring branch April 9, 2019 17:14
@Laremere Laremere added this to the v0.4.0 milestone Apr 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants