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

Start using go modules #320

Closed
stuarteberg opened this issue Jun 6, 2019 · 3 comments
Closed

Start using go modules #320

stuarteberg opened this issue Jun 6, 2019 · 3 comments

Comments

@stuarteberg
Copy link
Member

stuarteberg commented Jun 6, 2019

[Disclaimer: I'm not an expert on go package management, so let me know if anything below is off-base.]

Right now, we install several third-party go dependencies via plain calls to go get, which means that the exact version of the dependency you're installing depends on the current state of the third-party's git repo at the moment you install it.

If I understand correctly, go has lacked a good, standard solution to this problem for most of it's lifetime, but there is finally (as of go-1.11) a standard solution called "modules":

https://golang.org/cmd/go/#hdr-Modules__module_versions__and_more

We should change the dvid source code, build scripts, and developer instructions to start using modules as soon as possible. At the moment, our get-go-dependencies.sh script implements a couple of hacks to work around the "moving-target" problem described above. Those hacks can be fixed with modules.

@DocSavage
Copy link
Member

Yes. I've been looking into this and planned to move to this once we fixed our other build issues. A good intro is here: https://blog.golang.org/using-go-modules.

@DocSavage
Copy link
Member

Some of the major Go projects have had issues moving to Go modules. In particularly, I've noticed that gogo/protobuf and Badger are working things out. Since dgraph won't move to Go modules yet, they have Badger in a strange position.

@DocSavage
Copy link
Member

Was resolved with earlier refactoring above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants