fix(transform): preserve transitive class dependencies when inlining - #9766
fix(transform): preserve transitive class dependencies when inlining#9766proggeramlug wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (9)
Included review availability: Your plan provides up to 8 included reviews per hour; 4 remain after this review. 📝 WalkthroughWalkthroughCross-module inlining now detects imported class dependencies in function bodies, parameter defaults, closures, and namespace-qualified references. New unit tests and issue 9023 fixtures cover imported constructors, collections, iterators, and default arguments. ChangesTransitive Class Inlining
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to The imported-class inlining fix and its regression coverage are consistent, with no actionable merge-blocking risk identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 16 functions across 8 files. (1 skipped: 1 unsupported.)
✨ 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 |
|
Landed on |
Cross-module inlining copied
getEntityReferencesandtrackEntityReferenceinto consumers that imported only those helpers. Theirnew MultiMap()expressions lost the defining module’s imported-class metadata and compiled as empty ordinary objects, causing bothnext is not a functionandadd is not a function.Include imported class bindings in the existing source-module dependency checks for free functions and methods. Check parameter defaults and nested thunks as well as function bodies, and recognize namespace-qualified class names. Keep affected calls in their source module; unrelated helper inlining remains eligible.
Validation:
pre-tag-check.sh --quickand diff checks pass.test_affected_crates.sh --base origin/main: runtime passes; compiler CLI has 1,083 passed and the existingPERRY_CONCAT_SITE_CACHEcache-registry failure (fixed separately in fix(cache): register concat switch and explain codegen inputs #9748). The runner stops there; the affected transform/HIR/codegen suites above were also run separately.No version bump.
Closes #9023.
Summary by CodeRabbit
Bug Fixes
Tests