-
-
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 for Go 1.11 Modules #834
Conversation
Does Go kit not work with module-enabled downstream projects currently? |
I don't know. But I figured you guys might as well support it at the |
It is important to me that Go kit remains compatible with the most recent version of all of its dependencies. Concretely, I don't want to bind us to e.g. v2.x.x of a dependency, and then have to continuously bump the version in our go.mod/go.sum as that dependency continues to upgrade itself. If there is a way to keep this property with modules, I'm happy to do it. |
I agree that keeping Go kit compatible with the most recent version of all dependencies is important. But I also think that it makes sense to have a go.mod file that specifies the versions of dependencies that we have tested with. I think we should make sure that the go.mod file gets updated at least in combination with new tagged releases of Go kit. That go.mod file then allows projects that depend on Go kit and may stay pinned to a tagged release and perhaps not the most recent tagged release have a way to know which versions of our dependencies worked at that point in time. I believe we can have a go.mod file while also having our CI builds continue to track the newest dependency versions. We can use |
If you go this route, just make sure to Either way I believe I read that the old GOPATH based workflow is going to be replaced by Go modules this year or next year (likely just by default, but can be re-enabed by environment variable). And with an official Go package management tool, glide/govendor etc will all presumably die out unless Google fumbles the ball badly (which from my experience in using the beta version of Go modules, I think it unlikely). So it makes sense you don't want to get tied to old versions of your dependencies. But if u consider vendoring software a type of dependency, it makes sense to jump ship to the incoming official standard. I would suggest maybe try using Go modules for smaller projects and see how you like it then decide. I'm a pretty big fan of it myself. |
I just checked out this PR and tried
|
Similarly
This is on |
Finished for me on macOS 10.14.3 |
I upgraded go Go 1.11.5 and |
The issue with the influxdb client is known (influxdata/influxdb1-client#5) and other users describe how to resolve it in influxdata/influxdb1-client#5 (comment). |
|
this is a fix, but probably no good if |
I get similar test failures on Windows, and a few more as well:
|
Also, if you are going to with Go modules, you will want to set |
If you're referring to the influxdb issue, I'm pretty sure we're still getting the right version. The go.mod file requires |
O I see |
Were those tests passing before the Go module changes? |
The kitgen tests are known to fail on Windows (#740), so we can ignore those failures here. But the other tests all pass for me in GOPATH mode after a |
That's unfortunate. |
I'll still commit a version that go getted |
This error:
is fixed by building against github.com/golang/protobuf at commit golang/protobuf@8d0c54c or newer. So these commands show that in action:
The etcd error looks more complicated. The most recent release of etcd (3.3.12) is on a branch that diverged from master over a year ago and there have been over 2000 commits to master since then (https://github.com/etcd-io/etcd/branches). Go modules prefers tagged releases over the master branch, but GOPATH based
github.com/pact-foundation/pact-go has some 1.0.0-beta releases that go modules ignore by default so:
github.com/hudl/fargo has release tags without a
After these steps Getting the etcd go.mod file from master in the mix helps get rid of a lot of
|
Thanks for the help in fixing the versions. I'm still getting the following errors.
|
I'll just try copying your go.mod file directly and see how it goes |
Copy pasted ur go.mod directly, and just ran
down to 1 error in the |
Go 1.12 was just released today. So I will submit a new version of the |
There was a breaking change to the checksum algorithm (actually not the algorithm itself, but the way it is used) in Go 1.11.4, so checksum generated before and after will not be compatible with each other.
Go module provides a Also, careful with
|
I'll put a new version using Go 1.12.4 |
Just push an empty commit. |
The only test fail on my local machine is now metrics/cloudwatch2
|
Rebase on master should fix. |
I did do a git fetch upstream master earlier this morning (go-kit/kit being the upstream). Would I still need to rebase? |
I just did a |
The cloudwatch2 stuff is fixed in master, with 22a2d43. Make sure that's included, and re-fetch the dependencies with e.g.
|
Oh, yeah, I guess you need to update the Cloudwatch 2 dep to latest. (I don't respect modules in local dev or in CI, at the moment.) |
Any news please? |
@plo- my forks pretty behind. Lemme try this again from scratch because I forget how to update my fork with upstream changes. |
No description provided.