Skip to content

Commit

Permalink
Merge pull request #55396 from sttts/sttts-drop-deepcopy-registration
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

deepcopy: remove unused deepcopy func registration

Counterpart to kubernetes/gengo#67.

Kubernetes-commit: 7c8596a95fb37e3c1318e25ae505989122bd4e56
  • Loading branch information
k8s-publish-robot committed Nov 10, 2017
2 parents f9e7a4f + a4c3421 commit 5b4fddc
Show file tree
Hide file tree
Showing 28 changed files with 6 additions and 972 deletions.
1 change: 0 additions & 1 deletion pkg/api/resource/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ go_library(
"//vendor/github.com/gogo/protobuf/proto:go_default_library",
"//vendor/github.com/spf13/pflag:go_default_library",
"//vendor/gopkg.in/inf.v0:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library",
"//vendor/k8s.io/kube-openapi/pkg/common:go_default_library",
],
)
Expand Down
17 changes: 0 additions & 17 deletions pkg/api/resource/zz_generated.deepcopy.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,6 @@ limitations under the License.

package resource

import (
conversion "k8s.io/apimachinery/pkg/conversion"
reflect "reflect"
)

// GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them.
//
// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc {
return []conversion.GeneratedDeepCopyFunc{
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Quantity).DeepCopyInto(out.(*Quantity))
return nil
}, InType: reflect.TypeOf(&Quantity{})},
}
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Quantity) DeepCopyInto(out *Quantity) {
*out = in.DeepCopy()
Expand Down
18 changes: 0 additions & 18 deletions pkg/apis/meta/internalversion/zz_generated.deepcopy.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,9 @@ limitations under the License.
package internalversion

import (
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
reflect "reflect"
)

// GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them.
//
// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc {
return []conversion.GeneratedDeepCopyFunc{
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*List).DeepCopyInto(out.(*List))
return nil
}, InType: reflect.TypeOf(&List{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ListOptions).DeepCopyInto(out.(*ListOptions))
return nil
}, InType: reflect.TypeOf(&ListOptions{})},
}
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *List) DeepCopyInto(out *List) {
*out = *in
Expand Down
2 changes: 0 additions & 2 deletions pkg/apis/meta/v1/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ func AddToGroupVersion(scheme *runtime.Scheme, groupVersion schema.GroupVersion)
)

// register manually. This usually goes through the SchemeBuilder, which we cannot use here.
scheme.AddGeneratedDeepCopyFuncs(GetGeneratedDeepCopyFuncs()...)
AddConversionFuncs(scheme)
RegisterDefaults(scheme)
}
Expand All @@ -90,6 +89,5 @@ func init() {
)

// register manually. This usually goes through the SchemeBuilder, which we cannot use here.
scheme.AddGeneratedDeepCopyFuncs(GetGeneratedDeepCopyFuncs()...)
RegisterDefaults(scheme)
}
1 change: 0 additions & 1 deletion pkg/apis/meta/v1/unstructured/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ go_library(
importpath = "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
deps = [
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/conversion/unstructured:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
Expand Down
18 changes: 0 additions & 18 deletions pkg/apis/meta/v1/unstructured/zz_generated.deepcopy.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,9 @@ limitations under the License.
package unstructured

import (
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
reflect "reflect"
)

// GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them.
//
// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc {
return []conversion.GeneratedDeepCopyFunc{
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Unstructured).DeepCopyInto(out.(*Unstructured))
return nil
}, InType: reflect.TypeOf(&Unstructured{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*UnstructuredList).DeepCopyInto(out.(*UnstructuredList))
return nil
}, InType: reflect.TypeOf(&UnstructuredList{})},
}
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Unstructured) DeepCopyInto(out *Unstructured) {
clone := in.DeepCopy()
Expand Down
154 changes: 0 additions & 154 deletions pkg/apis/meta/v1/zz_generated.deepcopy.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,164 +21,10 @@ limitations under the License.
package v1

import (
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
types "k8s.io/apimachinery/pkg/types"
reflect "reflect"
)

// GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them.
//
// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc {
return []conversion.GeneratedDeepCopyFunc{
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*APIGroup).DeepCopyInto(out.(*APIGroup))
return nil
}, InType: reflect.TypeOf(&APIGroup{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*APIGroupList).DeepCopyInto(out.(*APIGroupList))
return nil
}, InType: reflect.TypeOf(&APIGroupList{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*APIResource).DeepCopyInto(out.(*APIResource))
return nil
}, InType: reflect.TypeOf(&APIResource{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*APIResourceList).DeepCopyInto(out.(*APIResourceList))
return nil
}, InType: reflect.TypeOf(&APIResourceList{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*APIVersions).DeepCopyInto(out.(*APIVersions))
return nil
}, InType: reflect.TypeOf(&APIVersions{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*DeleteOptions).DeepCopyInto(out.(*DeleteOptions))
return nil
}, InType: reflect.TypeOf(&DeleteOptions{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Duration).DeepCopyInto(out.(*Duration))
return nil
}, InType: reflect.TypeOf(&Duration{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ExportOptions).DeepCopyInto(out.(*ExportOptions))
return nil
}, InType: reflect.TypeOf(&ExportOptions{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*GetOptions).DeepCopyInto(out.(*GetOptions))
return nil
}, InType: reflect.TypeOf(&GetOptions{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*GroupKind).DeepCopyInto(out.(*GroupKind))
return nil
}, InType: reflect.TypeOf(&GroupKind{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*GroupResource).DeepCopyInto(out.(*GroupResource))
return nil
}, InType: reflect.TypeOf(&GroupResource{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*GroupVersion).DeepCopyInto(out.(*GroupVersion))
return nil
}, InType: reflect.TypeOf(&GroupVersion{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*GroupVersionForDiscovery).DeepCopyInto(out.(*GroupVersionForDiscovery))
return nil
}, InType: reflect.TypeOf(&GroupVersionForDiscovery{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*GroupVersionKind).DeepCopyInto(out.(*GroupVersionKind))
return nil
}, InType: reflect.TypeOf(&GroupVersionKind{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*GroupVersionResource).DeepCopyInto(out.(*GroupVersionResource))
return nil
}, InType: reflect.TypeOf(&GroupVersionResource{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Initializer).DeepCopyInto(out.(*Initializer))
return nil
}, InType: reflect.TypeOf(&Initializer{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Initializers).DeepCopyInto(out.(*Initializers))
return nil
}, InType: reflect.TypeOf(&Initializers{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*InternalEvent).DeepCopyInto(out.(*InternalEvent))
return nil
}, InType: reflect.TypeOf(&InternalEvent{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*LabelSelector).DeepCopyInto(out.(*LabelSelector))
return nil
}, InType: reflect.TypeOf(&LabelSelector{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*LabelSelectorRequirement).DeepCopyInto(out.(*LabelSelectorRequirement))
return nil
}, InType: reflect.TypeOf(&LabelSelectorRequirement{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*List).DeepCopyInto(out.(*List))
return nil
}, InType: reflect.TypeOf(&List{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ListMeta).DeepCopyInto(out.(*ListMeta))
return nil
}, InType: reflect.TypeOf(&ListMeta{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ListOptions).DeepCopyInto(out.(*ListOptions))
return nil
}, InType: reflect.TypeOf(&ListOptions{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*MicroTime).DeepCopyInto(out.(*MicroTime))
return nil
}, InType: reflect.TypeOf(&MicroTime{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ObjectMeta).DeepCopyInto(out.(*ObjectMeta))
return nil
}, InType: reflect.TypeOf(&ObjectMeta{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*OwnerReference).DeepCopyInto(out.(*OwnerReference))
return nil
}, InType: reflect.TypeOf(&OwnerReference{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Patch).DeepCopyInto(out.(*Patch))
return nil
}, InType: reflect.TypeOf(&Patch{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Preconditions).DeepCopyInto(out.(*Preconditions))
return nil
}, InType: reflect.TypeOf(&Preconditions{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*RootPaths).DeepCopyInto(out.(*RootPaths))
return nil
}, InType: reflect.TypeOf(&RootPaths{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*ServerAddressByClientCIDR).DeepCopyInto(out.(*ServerAddressByClientCIDR))
return nil
}, InType: reflect.TypeOf(&ServerAddressByClientCIDR{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Status).DeepCopyInto(out.(*Status))
return nil
}, InType: reflect.TypeOf(&Status{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*StatusCause).DeepCopyInto(out.(*StatusCause))
return nil
}, InType: reflect.TypeOf(&StatusCause{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*StatusDetails).DeepCopyInto(out.(*StatusDetails))
return nil
}, InType: reflect.TypeOf(&StatusDetails{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Time).DeepCopyInto(out.(*Time))
return nil
}, InType: reflect.TypeOf(&Time{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Timestamp).DeepCopyInto(out.(*Timestamp))
return nil
}, InType: reflect.TypeOf(&Timestamp{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*WatchEvent).DeepCopyInto(out.(*WatchEvent))
return nil
}, InType: reflect.TypeOf(&WatchEvent{})},
}
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *APIGroup) DeepCopyInto(out *APIGroup) {
*out = *in
Expand Down
38 changes: 0 additions & 38 deletions pkg/apis/meta/v1alpha1/zz_generated.deepcopy.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,47 +21,9 @@ limitations under the License.
package v1alpha1

import (
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
reflect "reflect"
)

// GetGeneratedDeepCopyFuncs returns the generated funcs, since we aren't registering them.
//
// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
func GetGeneratedDeepCopyFuncs() []conversion.GeneratedDeepCopyFunc {
return []conversion.GeneratedDeepCopyFunc{
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*PartialObjectMetadata).DeepCopyInto(out.(*PartialObjectMetadata))
return nil
}, InType: reflect.TypeOf(&PartialObjectMetadata{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*PartialObjectMetadataList).DeepCopyInto(out.(*PartialObjectMetadataList))
return nil
}, InType: reflect.TypeOf(&PartialObjectMetadataList{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Table).DeepCopyInto(out.(*Table))
return nil
}, InType: reflect.TypeOf(&Table{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TableColumnDefinition).DeepCopyInto(out.(*TableColumnDefinition))
return nil
}, InType: reflect.TypeOf(&TableColumnDefinition{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TableOptions).DeepCopyInto(out.(*TableOptions))
return nil
}, InType: reflect.TypeOf(&TableOptions{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TableRow).DeepCopyInto(out.(*TableRow))
return nil
}, InType: reflect.TypeOf(&TableRow{})},
{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*TableRowCondition).DeepCopyInto(out.(*TableRowCondition))
return nil
}, InType: reflect.TypeOf(&TableRowCondition{})},
}
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PartialObjectMetadata) DeepCopyInto(out *PartialObjectMetadata) {
*out = *in
Expand Down
1 change: 0 additions & 1 deletion pkg/apis/testapigroup/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ go_library(
importpath = "k8s.io/apimachinery/pkg/apis/testapigroup",
deps = [
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/conversion:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
],
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/testapigroup/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

// +k8s:deepcopy-gen=package,register
// +k8s:deepcopy-gen=package
// +groupName=testapigroup.apimachinery.k8s.io
//
// package testapigroup contains an testapigroup API used to demonstrate how to create api groups. Moreover, this is
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/testapigroup/v1/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

// +k8s:deepcopy-gen=package,register
// +k8s:deepcopy-gen=package
// +k8s:conversion-gen=k8s.io/apimachinery/pkg/apis/testapigroup
// +k8s:openapi-gen=false
// +k8s:defaulter-gen=TypeMeta
Expand Down
35 changes: 0 additions & 35 deletions pkg/apis/testapigroup/v1/zz_generated.deepcopy.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,44 +22,9 @@ package v1

import (
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
conversion "k8s.io/apimachinery/pkg/conversion"
runtime "k8s.io/apimachinery/pkg/runtime"
reflect "reflect"
)

func init() {
SchemeBuilder.Register(RegisterDeepCopies)
}

// RegisterDeepCopies adds deep-copy functions to the given scheme. Public
// to allow building arbitrary schemes.
//
// Deprecated: deepcopy registration will go away when static deepcopy is fully implemented.
func RegisterDeepCopies(scheme *runtime.Scheme) error {
return scheme.AddGeneratedDeepCopyFuncs(
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*Carp).DeepCopyInto(out.(*Carp))
return nil
}, InType: reflect.TypeOf(&Carp{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*CarpCondition).DeepCopyInto(out.(*CarpCondition))
return nil
}, InType: reflect.TypeOf(&CarpCondition{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*CarpList).DeepCopyInto(out.(*CarpList))
return nil
}, InType: reflect.TypeOf(&CarpList{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*CarpSpec).DeepCopyInto(out.(*CarpSpec))
return nil
}, InType: reflect.TypeOf(&CarpSpec{})},
conversion.GeneratedDeepCopyFunc{Fn: func(in interface{}, out interface{}, c *conversion.Cloner) error {
in.(*CarpStatus).DeepCopyInto(out.(*CarpStatus))
return nil
}, InType: reflect.TypeOf(&CarpStatus{})},
)
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Carp) DeepCopyInto(out *Carp) {
*out = *in
Expand Down
Loading

0 comments on commit 5b4fddc

Please sign in to comment.