diff options
| author | Tim Hockin <thockin@google.com> | 2016-06-06 22:46:24 -0700 |
|---|---|---|
| committer | Tim Hockin <thockin@google.com> | 2016-07-07 16:49:46 -0700 |
| commit | 4a69f7cd28fa45c3f34dfa1a2e89ca09bdea5294 (patch) | |
| tree | 8c91311afa8f9ce893606c5ef9d9f65b183bb944 /api_changes.md | |
| parent | 0bc86fd69bd94f5a8437b5a2b36578ad83fe49c9 (diff) | |
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).
Diffstat (limited to 'api_changes.md')
| -rw-r--r-- | api_changes.md | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/api_changes.md b/api_changes.md index 4af0bd7c..99aba0d7 100644 --- a/api_changes.md +++ b/api_changes.md @@ -468,12 +468,11 @@ regenerate auto-generated ones. To regenerate them run: hack/update-codegen.sh ``` -update-codegen will also generate code to handle deep copy of your versioned -api objects. The deep copy code resides with each versioned API: - - `pkg/api/<version>/deep_copy_generated.go` containing auto-generated copy functions - - `pkg/apis/extensions/<version>/deep_copy_generated.go` containing auto-generated copy functions +As part of the build, kubernetes will also generate code to handle deep copy of +your versioned api objects. The deep copy code resides with each versioned API: + - `<path_to_versioned_api>/zz_generated.deep_copy.go` containing auto-generated copy functions -If running the above script is impossible due to compile errors, the easiest +If regeneration is somehow not possible due to compile errors, the easiest workaround is to comment out the code causing errors and let the script to regenerate it. If the auto-generated conversion methods are not used by the manually-written ones, it's fine to just remove the whole file and let the |
