Repository navigation
fix(v3/generator): binding generation for cross-package type aliases - #4948
Conversation
WalkthroughRefactors cycle-detection to use native map[*types.TypeName]bool in the import collector and create renderer, fixes binding generation for cross-package type aliases, adds testcases demonstrating a SubPackageAlias and SubStruct, and updates generated JS/TS outputs and the changelog. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@ddmoney420 could you please test whether this solves the issue for you? |
|
…ailsapp#4948) * Add test case for aliases of imported types * Replace `typeutil.Map` with object-keyed map in `addTypeImpl` method * Replace `typeutil.Map` with object-keyed map in `needsCreateImpl` method * Update UNRELEASED_CHANGELOG.md * Update binding generator test data --------- Co-authored-by: Lea Anthony <lea.anthony@gmail.com>


Description
Fixes an issue that was preventing proper processing of alias dependencies, leading to missing package names and imports in binding generator output. Adds a new test case to prevent future regressions.
Fixes #4578
Many thanks to @MikeLINGxZ for reporting the issue and @ddmoney420 for debugging it.
Type of change
Please select the option that is relevant.
How Has This Been Tested?
Regenerated + type-checked test data and inspected the diff.
Test Configuration
Checklist:
website/src/pages/changelog.mdxwith details of this PRI have made corresponding changes to the documentationSummary by CodeRabbit
New Features
Bug Fixes