-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Cannot use GetOptions{}? #67
Comments
Check out this section of the readme: https://github.com/kubernetes/client-go#dependency-management Unfortunately this is just the way go works. If we didn't ship with the vendor folder, then you wouldn't have this problem--but you also would have no way of getting a set of dependencies that we believe works together. |
So am I right in my understanding that there's no way to use this library with plain That's a massive bummer :-( |
I spoke a little too soon, it does seem like we shouldn't do this to people
with our own packages. The meta/v1 package is pretty new, we're in the
process of moving various pieces to places that make more sense. We're also
vendoring the apimachinery repo because we're not to the point where we
want to version it--we expect it to change rapidly for a bit and we don't
want to break client-go users.
Maybe @deads2k or @smarterclayton have an idea about how to make this
better in the short term?
…On Tue, Jan 17, 2017 at 11:01 AM, Ruben Vermeersch ***@***.*** > wrote:
So am I right in my understanding that there's no way to use this library
with plain go get?
That's a massive bummer :-(
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#67 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAnglqkHAkRQEhN48pCD55RBZJSGEc32ks5rTRACgaJpZM4LkbAn>
.
|
You may want to go back to the previous alpha tag until we figure this out. |
Matching dependency levels is just the way that the native go vendoring system works. You really can't avoid it, even with your own packages, if you want to have different libraries that work together. For example, apimachinery, client-go, apiserver. It's very reasonable for someone to need all three. If you make copies, then the types won't match (go won't recognize second order interfaces which are equivalent) and it becomes impossible for any project (k8s.io/kubernetes, service-catalog, openshift, as examples), to rely on both client-go and apiserver no matter how they vendor. |
Actually, you may want to stick with the v1.5 tag until we sort this out. Like the top-level README says, |
I'm fine with that to be honest. As it stands it's simply impossible to use |
I just hit this as well.... I was really hoping that the client-go library would not have dependancies like this that forced the use of godeps. It's still better than getting the whole kubernetes project :) |
My current plan is to get the client to start using
https://github.com/golang/dep for dep management, but I'm shorthanded and
it is going to take a while to get this to happen.
…On Tue, Jan 24, 2017 at 1:50 PM, Dan Wilson ***@***.***> wrote:
I just hit this as well.... I was really hoping that the client-go library
would not have dependancies like this that forced the use of godeps. It's
still better than getting the whole kubernetes project :)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#67 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAngljyXuWPVY9BMhGBGIJyyie1gOufCks5rVnIqgaJpZM4LkbAn>
.
|
+1 to anything that can improve the first-time, out of the box experience. Fighting with a bunch of dependencies before you can get anything to run is a real headache. |
I was able to use dep locally in my own project to easily use the client and lock versions. go get github.com/golang/dep #from my project that uses client-go |
Great to hear, thanks!
…On Thu, Jan 26, 2017 at 3:31 PM, Dan Wilson ***@***.***> wrote:
I was able to use dep locally in my own project to easily use the client
and lock versions.
go get github.com/golang/dep
#from my project that uses client-go
dep ensure ***@***.***
dep ensure ***@***.***
dep ensure -update
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#67 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAngloUr9AXQN4hzbbwEI4davR3kld0Lks5rWSzYgaJpZM4LkbAn>
.
|
This by the way is the same issue as #83 |
Please use the v2.0.0 tag. I believe we have addressed most of the concerns raised here, please take a look at the current README. |
I'm having code like this:
Where
nsClient
is av1.NamespaceInterface
.This defines the
Get()
method as follows:Sadly
meta_v1
is a vendored package:If I refer to
GetOptions()
in my code directly, by adding the same import, I get the following:Whereas when I try to refer to the vendored package, I get the (correct) error:
How on earth is one supposed to use this library?
The text was updated successfully, but these errors were encountered: