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

go-client 5.0.1 does not build with dep #318

Closed
danderson opened this issue Oct 30, 2017 · 3 comments
Closed

go-client 5.0.1 does not build with dep #318

danderson opened this issue Oct 30, 2017 · 3 comments

Comments

@danderson
Copy link

I believe due to recent mutations in k8s.io/apimachinery, specifically kubernetes/apimachinery@158150c .

To reproduce:

  • Create $GOPATH/bug-repro, and copy examples/workqueue/main.go to it.
  • Install/update dep: go get -u github.com/golang/dep && go install github.com/golang/dep/cmd/dep
  • Run dep init. Note in the output that it correctly locks go-client to ^5.0.1.
  • go install .

The compile will fail with:

bug-repro/vendor/k8s.io/client-go/tools/cache

vendor/k8s.io/client-go/tools/cache/mutation_detector.go:103:33: scheme.Scheme.Copy undefined (type *"bug-repro/vendor/k8s.io/apimachinery/pkg/runtime".Scheme has no field or method Copy)

@caesarxuchao
Copy link
Member

dep doesn't parse the Godeps.json file that pins the exact dependency version. I recommend using glide at the moment. https://github.com/kubernetes/client-go/blob/master/INSTALL.md#glide

@caesarxuchao
Copy link
Member

caesarxuchao commented Oct 30, 2017

dep doesn't parse the Godeps.json file that pins the exact dependency version.

It seems dep does supports parsing Godeps.json now: https://github.com/golang/dep/blob/master/docs/FAQ.md#what-external-tools-are-supported.
[edit] actually that only works in the root project. dep still doesn't parse the Godeps.json in the transitive dependencies.

We also have other issues: golang/dep#1124

Updated the INSTALL.md to state the problem with dep: #319

@danderson
Copy link
Author

Thanks! I've switched to glide, and I got a successful build. Thanks for the help, and for updating the documentation on dep (I originally used dep because INSTALL.md seemed to say it would work).

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

No branches or pull requests

2 participants