Skip to content

fix(warnings): SubmodBucket dead-code warning from #7433 - #7440

Merged
proggeramlug merged 1 commit into
mainfrom
fix/submod-bucket-dead-code
Aug 5, 2026
Merged

fix(warnings): SubmodBucket dead-code warning from #7433#7440
proggeramlug merged 1 commit into
mainfrom
fix/submod-bucket-dead-code

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

What

#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 deleting them would shift every other bucket — but with the feature off they are never constructed:

$ cargo check -p perry-runtime --no-default-features --features full
warning: variants `Test` and `TestReporters` 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

    • Removed an unnecessary dead-code warning in builds that exclude Node test support.
    • Preserved submodule registry indexing behavior across build configurations.
  • Documentation

    • Added a changelog entry describing the warning suppression.

#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.
@proggeramlug
proggeramlug force-pushed the fix/submod-bucket-dead-code branch from 5e847c3 to 4860315 Compare August 5, 2026 11:12
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@proggeramlug, you've reached your PR review limit, so we couldn't start this review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6eb1d600-186c-4452-950b-04dd66540fad

📥 Commits

Reviewing files that changed from the base of the PR and between 77fa4c5 and 4860315.

📒 Files selected for processing (2)
  • changelog.d/7440-submod-bucket-dead-code.md
  • crates/perry-runtime/src/node_submodules/mod.rs
📝 Walkthrough

Walkthrough

Changes

SubmodBucket dead-code handling

Layer / File(s) Summary
Conditional dead-code allowance
crates/perry-runtime/src/node_submodules/mod.rs, changelog.d/7440-submod-bucket-dead-code.md
The runtime conditionally allows dead-code warnings when mod-node-test is disabled. Test-related SubmodBucket discriminants remain available for registry sizing and indexing. The changelog records this behavior.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: thehypnoo

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the problem and solution, but it omits the required Summary, Changes, Related issue, Test plan, and Checklist sections. Reformat the description to use the repository template and include the related issue, test commands and results, and checklist items.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the warning fix for the SubmodBucket dead-code issue and references the related issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/submod-bucket-dead-code

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@proggeramlug
proggeramlug merged commit 459c012 into main Aug 5, 2026
8 of 11 checks passed
@proggeramlug
proggeramlug deleted the fix/submod-bucket-dead-code branch August 5, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant