Commit Graph

20 Commits

Author SHA1 Message Date
k8s-merge-robot
de0e6de82b Merge pull request #28430 from smarterclayton/fix_empty_deep_copy
Automatic merge from submit-queue

WIP - Handle map[]struct{} in DeepCopy

Deep copy was not properly handling the empty struct case we use for Sets.

@lavalamp I need your expertise when you have some time - the go2idl parser is turning sets.String into the following tree:

    type:         sets.String           kind: Alias
      underlying: map[string]sets.Empty kind: Map
        key:      string                kind: Builtin
        elem:     set.Empty             kind: Struct
                                              ^
                                              should be Alias

Looking at tc.Named, I'm not sure what the expected outcome would be and why you flatten there.
2016-07-04 04:34:54 -07:00
Clayton Coleman
6eb04ae592 Handle map[]struct{} special 2016-07-03 00:44:25 -04:00
Clayton Coleman
534075f828 Deep copy should always use existing functions that are not ignored
While testing this fix in OpenShift it was discovered that the
PackageConstraint was overly aggressive - types that declare a public
copy function should always return true.  PackageConstraint is intended
to limit packages where we might generate deep copy function, rather
than to prevent external packages from being consumed.
2016-07-03 00:12:13 -04:00
Clayton Coleman
903a2db90a Make generated build tag parameterizable for go2idl
Downstream generators that want to reuse the upstream generated types
need to be able to define a different ignore tag (so that they can see
the already generated types).
2016-07-03 00:12:10 -04:00
David McMahon
ef0c9f0c5b Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
Clayton Coleman
1c8b928908 Handle aliases correctly in deepcopy/conversion 2016-06-27 21:42:02 -07:00
Clayton Coleman
460726c67d Use inline assignment on string alias deep copies 2016-06-06 17:18:22 -04:00
Clayton Coleman
0181ac61da DeepCopy should only generate types in k8s.io/kubernetes
Also make generation more selective (require opt in) to prevent lots of
unnecessary generated deep copies.
2016-06-06 17:18:22 -04:00
Clayton Coleman
4554889ae9 Conversions have kube-isms and are not portable for downstream
Some minor fixes to enable generators for OpenShift and others who need
to generate conversions on Kube API groups outside the core.
2016-05-11 14:04:03 -04:00
Chao Xu
2b0c849e83 remove dot in deepcopy package name 2016-04-19 14:01:41 -07:00
goltermann
a3104ba96c Final vet fixes; enabling vet checks in verify scripts. 2016-04-13 13:51:51 -07:00
Wojciech Tyczynski
f1248b9c82 Migrate to new conversion generator 2016-03-22 08:43:02 +01:00
Wojciech Tyczynski
04eb0d40bb Migrate everything to new deep-copy generator. 2016-03-17 15:22:18 +01:00
Wojciech Tyczynski
74d005f1cf Generate DeepCopies per directory. 2016-03-17 09:28:11 +01:00
Wojciech Tyczynski
919afadbe7 Refactor import tracker 2016-03-15 16:02:18 +01:00
Wojciech Tyczynski
0db2012039 Refactor assmebling proto files to avoid code duplication 2016-03-11 15:54:10 +01:00
Wojciech Tyczynski
205e6899be Generate public deep-copy functions 2016-02-03 13:33:24 +01:00
Wojciech Tyczynski
f9f840a1c6 Remove debug log 2015-12-30 14:42:02 +01:00
Wojciech Tyczynski
baf97c9c5e First use of new deep-copy generator. 2015-12-29 18:06:09 +01:00
Wojciech Tyczynski
68d2824a45 Generate deep copies with framework. 2015-11-12 10:38:25 +01:00