fix(transform): keep enum references out of cross-module inlining - #10866
proggeramlug wants to merge 1 commit into
Conversation
|
Understand this PR’s impact Explore downstream dependencies and potential security impact with Blast Radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 8 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughCross-module inlining now rejects functions and methods that reference TypeScript enum members. Unit and integration tests verify that enum-dependent code remains in its source module and executes correctly across module boundaries. ChangesCross-module enum inlining safety
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 55.56% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 4 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1🧪 Generate unit tests (beta)
🛠️ Fix failing CI checks 💡
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 via merge train 252 (#10892) as v0.5.1632 — merge commit Carried with #10866, #10876, #10867, #10874 and #10862, which all touch overlapping surfaces. Train-side work: #10867 and #10874 each add a module declaration to the same regression-test index (additive — both kept, sorted by issue); #10862's version-bump commits were excluded, since contributor PRs do not bump; and Validation: 173 gap fixtures across seven areas, zero regressions, re-run against the current base after v0.5.1631 changed Closing here rather than merging — a train lands the commits directly. |
Closes #10417.
Cross-module function and method bodies are copied into the importing module, but
Expr::EnumMemberis resolved against the current module's enum table. Reject enum-bearing bodies in all three harvesting paths so they remain outlined in the source module.Regression coverage includes:
Tests:
cargo test -p perry-transformcargo test -p perry --test source_graph_export_regressions issue_10417Summary by CodeRabbit
Bug Fixes
Tests