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

Rely on Go Modules to ensure package dependencies and replicable builds #73

Closed
filipecosta90 opened this issue Jul 24, 2020 · 0 comments · Fixed by #74
Closed

Rely on Go Modules to ensure package dependencies and replicable builds #73

filipecosta90 opened this issue Jul 24, 2020 · 0 comments · Fixed by #74
Assignees
Labels
enhancement New feature or request

Comments

@filipecosta90
Copy link
Collaborator

why we need it?

Go Modules is the official Go dependency management tool, and it’s directly implemented into the go toolchain.
We need this in order to:

  • Automatically detect import statements and then update dependencies graph, lock, download, and install appropriate versions of packages.

    Quoting golang official docs
    :

In Go 1.14, module support is considered ready for production use, and all users are encouraged to migrate to modules from other dependency management systems.

Also quoting the golang official blog, the reason why this does not break compatibility with previous go versions:

(Inside $GOPATH/src, for compatibility, the go command still runs in the old GOPATH mode, even if a go.mod is found. See the go command documentation for details.) Starting in Go 1.13, module mode will be the default for all development.

minimum specified version

we will need to ensure we have a go.mod on all go clients ( and test at least with the minimum 1.12 go version to say we support >=1.12 ). Ideally it should be 1.11 but redigo outputs an error:

$ gvm use go1.11
Now using version go1.11
filipe@filipe-ThinkPad-T490:~/go/src/github.com/RedisBloom/redisbloom-go$ GOCMD="GO111MODULE=on go" make
GO111MODULE=on go get -t -v ./...
go get: -t flag is a no-op when using modules
github.com/gomodule/redigo/redis
go build github.com/gomodule/redigo/redis: module requires Go 1.14
make: *** [Makefile:24: get] Error 1
@filipecosta90 filipecosta90 self-assigned this Aug 2, 2020
@filipecosta90 filipecosta90 added the enhancement New feature or request label Aug 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant