fix(compile): preserve Redis class helper captures - #10876
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 (3)
Included review availability: Your plan provides up to 8 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe CommonJS top-level declaration scanner now handles comma-separated ChangesCommonJS multiline variable hoisting
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
Full details: Linked Issues checkExplanation The changes address Full details: Docstring CoverageExplanation Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 |
|
Closing after full real-package validation disproved the hypothesis: the patched 543-module Redis binary still throws the original private-helper error, and the installed @redis/client declaration is a single physical line. The scanner regression is real in isolation but does not fix #10660, so this should not merge as the issue fix. |
|
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 #10660
@redis/clientemits its private-field helper bindings as one comma-separated top-levelvardeclaration spread across multiple lines. Perry's CommonJS hoist-safety scanner stopped at the first newline, missed the later bindings, and incorrectly movedRedisClientoutside the module factory. That severed the class methods' captures of helpers such as_RedisClient_isolationPool, leaving capture slot 7 undefined.Continue scanning across physical newlines only when a top-level comma proves the declaration continues. ASI-terminated declarations keep their existing behavior.
Validation:
cargo test -p perry cjs_wrap::tests --bin perry(108 passed)Summary by CodeRabbit