solo-io / kubesquash

A debugger for Kubernetes applications.
228 stars 15 forks source link

Error during go get #13

Closed mazzy89 closed 5 years ago

mazzy89 commented 5 years ago

I'm trying to get kubesquash but I get the following error:

# github.com/solo-io/solo-kit/pkg/api/v1/clients/kube/crd
solo-kit/pkg/api/v1/clients/kube/crd/crd.go:64:3: cannot use "k8s.io/apimachinery/pkg/apis/meta/v1".ObjectMeta literal (type "k8s.io/apimachinery/pkg/apis/meta/v1".ObjectMeta) as type "k8s.io/apiextensions-apiserver/vendor/k8s.io/apimachinery/pkg/apis/meta/v1".ObjectMeta in field value
mazzy89 commented 5 years ago
➜ go run cmd/kubesquash/main.go
# github.com/solo-io/squash/pkg/api/v1
../squash/pkg/api/v1/debug_attachment.sk.go:133:9: cannot use &t (type *"github.com/solo-io/solo-kit/vendor/k8s.io/apimachinery/pkg/apis/meta/v1".TypeMeta) as type "k8s.io/apimachinery/pkg/runtime/schema".ObjectKind in return argument:
    *"github.com/solo-io/solo-kit/vendor/k8s.io/apimachinery/pkg/apis/meta/v1".TypeMeta does not implement "k8s.io/apimachinery/pkg/runtime/schema".ObjectKind (wrong type for GroupVersionKind method)
        have GroupVersionKind() "github.com/solo-io/solo-kit/vendor/k8s.io/apimachinery/pkg/runtime/schema".GroupVersionKind
        want GroupVersionKind() "k8s.io/apimachinery/pkg/runtime/schema".GroupVersionKind
../squash/pkg/api/v1/debug_attachment.sk.go:140:36: not enough arguments in call to crd.NewCrd
    have (string, string, string, string, string, string, *DebugAttachment)
    want (string, string, string, string, string, string, bool, "github.com/solo-io/solo-kit/vendor/k8s.io/apimachinery/pkg/runtime".Object)
bartoszmajsak commented 5 years ago

Can you share the output of go mod graph?

Here's mine https://gist.github.com/fec2c0a506292a6051903c0beaa5bedf

mazzy89 commented 5 years ago

It is important to export GO111MODULE=on. Fixed.