-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix index method name collisions #2335
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2335 +/- ##
=======================================
Coverage 53.21% 53.21%
=======================================
Files 853 853
Lines 259188 259246 +58
=======================================
+ Hits 137930 137964 +34
- Misses 101869 101887 +18
- Partials 19389 19395 +6
Continue to review full report at Codecov.
|
I've also made changes here to resolve the issue raised by @majguo in #2330, and I suspect our changes are going to conflict. Let's sync up and determine what order to merge them in @theunrepentantgeek. |
v2/tools/generator/internal/codegen/pipeline/export_controller_type_registrations.go
Outdated
Show resolved
Hide resolved
v2/tools/generator/internal/codegen/pipeline/export_controller_type_registrations.go
Outdated
Show resolved
Hide resolved
v2/tools/generator/internal/codegen/pipeline/export_controller_type_registrations.go
Show resolved
Hide resolved
v2/tools/generator/internal/codegen/pipeline/export_controller_type_registrations.go
Outdated
Show resolved
Hide resolved
e571480
to
b7c2b2c
Compare
What this PR does / why we need it:
We are now encountering collisions with our generated index method names, caused by having multiple properties nested (via different paths) with the same name.
This PR uses parts of the full property path to the property to avoid collisions, as we discussed offline.
Closes #2332
Special notes for your reviewer:
Takes the preexisting
indexFunctionBuilderContext
type and converts it into a full abstraction for a property chain. The implementation is changed so that chains form a tree of (nearly) immutable references, both to keep memory use down and to allow disambiguation.How does this PR make you feel:
If applicable: