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

Dependency resolution issues with Go Modules. #474

Closed
jharshman opened this issue Sep 26, 2018 · 4 comments
Closed

Dependency resolution issues with Go Modules. #474

jharshman opened this issue Sep 26, 2018 · 4 comments

Comments

@jharshman
Copy link

jharshman commented Sep 26, 2018

Running into some dependency resolution issues using go 1.11 and go modules

I'm experiencing what I think is version incompatibilities in my package dependencies.

Here is the error I am receiving when running go build ./...

# k8s.io/client-go/pkg/apis/clientauthentication/v1alpha1
/go/pkg/mod/k8s.io/client-go@v8.0.0+incompatible/pkg/apis/clientauthentication/v1alpha1/zz_generated.conversion.go:39:15: scheme.AddGeneratedConversionFuncs undefined (type *runtime.Scheme has no field or method AddGeneratedConversionFuncs)
# k8s.io/client-go/pkg/apis/clientauthentication/v1beta1
/go/pkg/mod/k8s.io/client-go@v8.0.0+incompatible/pkg/apis/clientauthentication/v1beta1/zz_generated.conversion.go:39:15: scheme.AddGeneratedConversionFuncs undefined (type *runtime.Scheme has no field or method AddGeneratedConversionFuncs)
# k8s.io/kubernetes/pkg/util/parsers
/go/pkg/mod/k8s.io/kubernetes@v1.11.3/pkg/util/parsers/parsers.go:36:16: undefined: reference.ParseNormalizedNamed
# k8s.io/kubernetes/pkg/apis/admissionregistration/v1alpha1
/go/pkg/mod/k8s.io/kubernetes@v1.11.3/pkg/apis/admissionregistration/v1alpha1/zz_generated.conversion.go:39:15: scheme.AddGeneratedConversionFuncs undefined (type *runtime.Scheme has no field or method AddGeneratedConversionFuncs)
# k8s.io/kubernetes/pkg/apis/admissionregistration/v1beta1
/go/pkg/mod/k8s.io/kubernetes@v1.11.3/pkg/apis/admissionregistration/v1beta1/zz_generated.conversion.go:40:15: scheme.AddGeneratedConversionFuncs undefined (type *runtime.Scheme has no field or method AddGeneratedConversionFuncs)
# k8s.io/kubernetes/pkg/apis/authentication/v1
/go/pkg/mod/k8s.io/kubernetes@v1.11.3/pkg/apis/authentication/v1/zz_generated.conversion.go:41:15: scheme.AddGeneratedConversionFuncs undefined (type *runtime.Scheme has no field or method AddGeneratedConversionFuncs)
# k8s.io/kubernetes/pkg/apis/authentication/v1beta1
/go/pkg/mod/k8s.io/kubernetes@v1.11.3/pkg/apis/authentication/v1beta1/zz_generated.conversion.go:39:15: scheme.AddGeneratedConversionFuncs undefined (type *runtime.Scheme has no field or method AddGeneratedConversionFuncs)
# k8s.io/kubernetes/pkg/apis/authorization/v1
/go/pkg/mod/k8s.io/kubernetes@v1.11.3/pkg/apis/authorization/v1/zz_generated.conversion.go:39:15: scheme.AddGeneratedConversionFuncs undefined (type *runtime.Scheme has no field or method AddGeneratedConversionFuncs)
# k8s.io/kubernetes/pkg/apis/authorization/v1beta1
/go/pkg/mod/k8s.io/kubernetes@v1.11.3/pkg/apis/authorization/v1beta1/zz_generated.conversion.go:39:15: scheme.AddGeneratedConversionFuncs undefined (type *runtime.Scheme has no field or method AddGeneratedConversionFuncs)
# k8s.io/kubernetes/pkg/apis/autoscaling/v1
/go/pkg/mod/k8s.io/kubernetes@v1.11.3/pkg/apis/autoscaling/v1/zz_generated.conversion.go:43:15: scheme.AddGeneratedConversionFuncs undefined (type *runtime.Scheme has no field or method AddGeneratedConversionFuncs)
# k8s.io/kubernetes/pkg/apis/autoscaling/v2beta1
/go/pkg/mod/k8s.io/kubernetes@v1.11.3/pkg/apis/autoscaling/v2beta1/zz_generated.conversion.go:43:15: scheme.AddGeneratedConversionFuncs undefined (type *runtime.Scheme has no field or method AddGeneratedConversionFuncs)
# k8s.io/kubernetes/pkg/apis/certificates/v1beta1
/go/pkg/mod/k8s.io/kubernetes@v1.11.3/pkg/apis/certificates/v1beta1/zz_generated.conversion.go:39:15: scheme.AddGeneratedConversionFuncs undefined (type *runtime.Scheme has no field or method AddGeneratedConversionFuncs)
# k8s.io/kubernetes/pkg/apis/componentconfig/v1alpha1
/go/pkg/mod/k8s.io/kubernetes@v1.11.3/pkg/apis/componentconfig/v1alpha1/zz_generated.conversion.go:39:15: scheme.AddGeneratedConversionFuncs undefined (type *runtime.Scheme has no field or method AddGeneratedConversionFuncs)
# k8s.io/kubernetes/pkg/apis/policy/v1beta1
/go/pkg/mod/k8s.io/kubernetes@v1.11.3/pkg/apis/policy/v1beta1/zz_generated.conversion.go:43:15: scheme.AddGeneratedConversionFuncs undefined (type *runtime.Scheme has no field or method AddGeneratedConversionFuncs)
# k8s.io/kubernetes/pkg/apis/networking/v1
/go/pkg/mod/k8s.io/kubernetes@v1.11.3/pkg/apis/networking/v1/zz_generated.conversion.go:43:15: scheme.AddGeneratedConversionFuncs undefined (type *runtime.Scheme has no field or method AddGeneratedConversionFuncs)
# k8s.io/kubernetes/pkg/apis/rbac/v1beta1
/go/pkg/mod/k8s.io/kubernetes@v1.11.3/pkg/apis/rbac/v1beta1/zz_generated.conversion.go:40:15: scheme.AddGeneratedConversionFuncs undefined (type *runtime.Scheme has no field or method AddGeneratedConversionFuncs)
# k8s.io/kubernetes/pkg/apis/rbac/v1
/go/pkg/mod/k8s.io/kubernetes@v1.11.3/pkg/apis/rbac/v1/zz_generated.conversion.go:40:15: scheme.AddGeneratedConversionFuncs undefined (type *runtime.Scheme has no field or method AddGeneratedConversionFuncs)
# k8s.io/kubernetes/pkg/apis/rbac/v1alpha1
/go/pkg/mod/k8s.io/kubernetes@v1.11.3/pkg/apis/rbac/v1alpha1/zz_generated.conversion.go:40:15: scheme.AddGeneratedConversionFuncs undefined (type *runtime.Scheme has no field or method AddGeneratedConversionFuncs)
# k8s.io/kubernetes/pkg/apis/scheduling/v1alpha1
/go/pkg/mod/k8s.io/kubernetes@v1.11.3/pkg/apis/scheduling/v1alpha1/zz_generated.conversion.go:39:15: scheme.AddGeneratedConversionFuncs undefined (type *runtime.Scheme has no field or method AddGeneratedConversionFuncs)
# k8s.io/kubernetes/pkg/apis/scheduling/v1beta1
/go/pkg/mod/k8s.io/kubernetes@v1.11.3/pkg/apis/scheduling/v1beta1/zz_generated.conversion.go:39:15: scheme.AddGeneratedConversionFuncs undefined (type *runtime.Scheme has no field or method AddGeneratedConversionFuncs)
# k8s.io/kubernetes/pkg/apis/storage/v1
/go/pkg/mod/k8s.io/kubernetes@v1.11.3/pkg/apis/storage/v1/zz_generated.conversion.go:41:15: scheme.AddGeneratedConversionFuncs undefined (type *runtime.Scheme has no field or method AddGeneratedConversionFuncs)
# k8s.io/kubernetes/pkg/apis/storage/v1alpha1
/go/pkg/mod/k8s.io/kubernetes@v1.11.3/pkg/apis/storage/v1alpha1/zz_generated.conversion.go:39:15: scheme.AddGeneratedConversionFuncs undefined (type *runtime.Scheme has no field or method AddGeneratedConversionFuncs)
# k8s.io/kubernetes/pkg/apis/storage/v1beta1
/go/pkg/mod/k8s.io/kubernetes@v1.11.3/pkg/apis/storage/v1beta1/zz_generated.conversion.go:41:15: scheme.AddGeneratedConversionFuncs undefined (type *runtime.Scheme has no field or method AddGeneratedConversionFuncs)

And here is my go.mod

module github.ancestry.com/Ancestry/platform-haas

require (
        github.com/BurntSushi/toml v0.3.1 // indirect
        github.com/Masterminds/semver v1.4.2 // indirect
        github.com/Masterminds/sprig v2.16.0+incompatible // indirect
        github.com/aokoli/goutils v1.0.1 // indirect
        github.com/docker/distribution v2.6.2+incompatible // indirect
        github.com/ghodss/yaml v1.0.0 // indirect
        github.com/gobwas/glob v0.2.3 // indirect
        github.com/gogo/protobuf v1.1.1 // indirect
        github.com/golang/mock v1.1.1
        github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db // indirect
        github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf // indirect
        github.com/google/uuid v1.0.0 // indirect
        github.com/gorilla/mux v1.6.2
        github.com/hashicorp/errwrap v1.0.0 // indirect
        github.com/hashicorp/go-cleanhttp v0.5.0
        github.com/hashicorp/go-rootcerts v0.0.0-20160503143440-6bb64b370b90
        github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86 // indirect
        github.com/hashicorp/vault v0.11.1
        github.com/huandu/xstrings v1.2.0 // indirect
        github.com/imdario/mergo v0.3.6 // indirect
        github.com/json-iterator/go v1.1.5 // indirect
        github.com/mitchellh/go-homedir v1.0.0
        github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
        github.com/modern-go/reflect2 v1.0.1 // indirect
        github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735 // indirect
        github.com/sethgrid/pester v0.0.0-20180430140037-03e26c9abbbf
        github.com/sirupsen/logrus v1.1.0
        github.com/spf13/cobra v0.0.3
        github.com/spf13/viper v1.2.0
        golang.org/x/net v0.0.0-20180926154720-4dfa2610cdf3
        golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2 // indirect
        google.golang.org/grpc v1.15.0 // indirect
        gopkg.in/inf.v0 v0.9.1 // indirect
        gopkg.in/yaml.v2 v2.2.1
        k8s.io/api v0.0.0-20180925152912-a191abe0b71e // indirect
        k8s.io/apiextensions-apiserver v0.0.0-20180925155151-c0b566b8903b // indirect
        k8s.io/apimachinery v0.0.0-20180925152725-5ae511e0ed34 // indirect
        k8s.io/apiserver v0.0.0-20180925200106-4eecb3917976 // indirect
        k8s.io/client-go v8.0.0+incompatible // indirect
        k8s.io/helm v2.11.0+incompatible
        k8s.io/kubernetes v1.11.3 // indirect
)

Any help would be greatly appreciated :)

Thanks!

@jharshman
Copy link
Author

golang/go#27457 - turned out to be unrelated to client-go and more related to ApiMachinery and other dependencies.

@fiunchinho
Copy link

I'm facing a similar issue, how did you fix it @jharshman ?

@jharshman
Copy link
Author

@fiunchinho client-go is part of a mono-repo in transition. You should ensure that all the versions match if you are using things like client-go and apimachinery or other components.

@fiunchinho
Copy link

I'm tried doing that, but it doesn't work. I'm using client-go v8.0.0, with apimachinery and the likes using kubernetes-1.11.3, and code-generator in hack/update-codegen.sh uses 1.11.3 to generate my code. But still I get compile errors.

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