deepcopy-gen: remove dead --bounding-dirs flag#137348
deepcopy-gen: remove dead --bounding-dirs flag#137348Jefftree wants to merge 1 commit intokubernetes:masterfrom
Conversation
The --bounding-dirs flag and BoundingDirs field in deepcopy-gen are dead code. The field is stored on the genDeepCopy struct but never read by any method. The flag was introduced in gengo commit 14ae879 (2016) to control which types deepcopy would generate for and which nested types it could assume had generated deepcopy functions. Over time, as deepcopy-gen was rewritten (gengo v2, moved to code-generator), the copyableAndInBounds / isRootedUnder usage was dropped. The field and flag survived but g.boundingDirs is never referenced in the current code. hack/update-codegen.sh still passed --bounding-dirs but it had no effect.
|
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Jefftree The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Removes the dead
--bounding-dirsflag andBoundingDirsfield from deepcopy-gen.This flag was added by @thockin back in 2016 (kubernetes/gengo@14ae879) to control which nested types deepcopy-gen could assume had generated DeepCopy functions. It got dropped when deepcopy-gen was rewritten for gengo v2 and moved to code-generator — the field and flag survived but
g.boundingDirsis never actually read anywhere in the current code.hack/update-codegen.shstill passed--bounding-dirs "k8s.io/kubernetes,k8s.io/api"but it had no effect.Which issue(s) this PR is related to:
Discovered this while trying to use a similar bounding dir concept to address kubernetes/kube-openapi#571.
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: