Use file tags to generate deep-copies

This drives most of the logic of deep-copy generation from tags like:
  // +deepcopy-gen=package
..rather than hardcoded lists of packages.  This will make it possible to
subsequently generate code ONLY for packages that need it *right now*, rather
than all of them always.

Also remove pkgs that really do not need deep-copies (no symbols used
anywhere).
This commit is contained in:
Tim Hockin
2016-06-06 22:46:24 -07:00
parent 4c4c6fc40e
commit 28af54138d
41 changed files with 723 additions and 203 deletions

View File

@@ -75,12 +75,14 @@ cmd/libs/go2idl/ tool.
1. Generate conversions and deep-copies:
1. Add your "group/" or "group/version" into
cmd/libs/go2idl/{conversion-gen, deep-copy-gen}/main.go;
cmd/libs/go2idl/conversion-gen/main.go;
2. Make sure your pkg/apis/`<group>`/`<version>` directory has a doc.go file
with the comment `// +k8s:deepcopy-gen=register`, to catch the attention
of our generation tools.
3. Make sure your pkg/apis/`<group>`/`<version>` directory has a doc.go file
with the comment `// +genconversion=true`, to catch the attention of our
gen-conversion script.
3. Run hack/update-all.sh.
4. Run hack/update-all.sh.
2. Generate files for Ugorji codec: