dvid
dvid copied to clipboard
Start using go modules
[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.
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.
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.