fix(warnings): SubmodBucket dead-code warning from #7433 - #7440
Conversation
#7433 put `node:test` behind `mod-node-test` but left the `SubmodBucket::Test` and `::TestReporters` variants ungated — they carry the discriminants that size and index `SUBMOD_REGISTRY`, so removing them would shift every other bucket. With the feature off they are never constructed, and `cargo check -p perry-runtime --no-default-features --features full` reports: warning: variants `Test` and `TestReporters` are never constructed The variants must stay for their discriminants, so mark the enum `allow(dead_code)` only in that configuration. Default builds are unchanged.
5e847c3 to
4860315
Compare
|
Warning Review limit reached
Next review available in: 18 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughChangesSubmodBucket dead-code handling
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 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 |
What
#7433 put
node:testbehindmod-node-testbut left theSubmodBucket::Testand::TestReportersvariants ungated. They carry the discriminants that size and indexSUBMOD_REGISTRY, so deleting them would shift every other bucket — but with the feature off they are never constructed:That is the configuration the auto-optimize rebuild uses, and the workspace is meant to be at zero warnings (#6837).
The variants have to stay for their discriminants, so this marks the enum
allow(dead_code)only in that configuration. Default builds are unchanged.My regression from #7433; found while measuring an unrelated gate.
Summary by CodeRabbit
Bug Fixes
Documentation