-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
support go mod #905
Comments
Go kit is not incompatible with projects that use modules, so in that sense this is already done. But (as I've said in the past) the problem with adding a go.mod to this project itself is that I explicitly don't want to enforce minimum version selection on my consumers. I want Go kit to always be compatible with the latest (stable) releases of all of its dependencies, and I want to fix problems that would prevent that from being true as soon as they come up. So, how do we square this circle? Is there a way to have a go.mod that is continuously and automatically updated with the latest stable versions of all dependencies, and can alert me on build or test failures? |
you could possibly configure https://dependabot.com for go modules, and have it auto-merge on passing builds |
I guess I left out the other side of the equation, which is that within a major version, upgrades are presumed to be backwards-compatible, so an end user is free to use v1.2.0 of a dep that I have pinned at v1.1.0, if necessary; and that breaking changes (should) necessarily coincide with major version upgrades, which are entirely different imports that can coexist in a compilation unit. So: maybe it's fine. I would still not like to take on the maintenance burden of tracking major version bumps over time in my go.mod, but perhaps I'm overestimating how often that will happen. |
O got this erro Problem
|
Would it be too routine to update Moving to Also,
|
Another consideration is - suppose you want to contribute some feature, you update all the dependencies, then you build Now you have to stop working on your feature and investigate what is going with the failing tests, cause you can't even make your CI pipeline pass. And, if you want to contribute this single feature to If you were to have builds based on |
Also, trying to run mbp-iurii:kit iurii$ go version
go version go1.13 darwin/amd64
mbp-iurii:kit iurii$ ./update_deps.bash
can't load package: named files must be .go files: bufio
can't load package: named files must be .go files: github.com/go-kit/kit/log It works with |
And, running tests locally (with the latest version of dependencies) I see some of them fail seemingly for integration reasons: --- FAIL: TestProcess/foo (0.03s)
--- FAIL: TestProcess/foo/flat (0.01s)
main_test.go:63: - import "context"
main_test.go:63: - import "encoding/json"
main_test.go:63: - import "errors"
main_test.go:63: - import "net/http"
main_test.go:63: - import "github.com/go-kit/kit/endpoint"
main_test.go:63: - import httptransport "github.com/go-kit/kit/transport/http"
main_test.go:63: + import (
main_test.go:63: + "context"
main_test.go:63: + "encoding/json"
main_test.go:63: + "errors"
main_test.go:63: + "net/http"
main_test.go:63: +
main_test.go:63: + "github.com/go-kit/kit/endpoint"
main_test.go:63: +
main_test.go:63: + httptransport "github.com/go-kit/kit/transport/http"
main_test.go:63: + ) Looks like some code-generating library changed output format ... So, it is a frustrating (if not blocking) experience for a contributor ... |
Fixed in #945 |
I believe every concern I've raised in this issue is fixed, thanks to @ChrisHines! |
No description provided.
The text was updated successfully, but these errors were encountered: