Remove unjustified dead-code expectation (#322) - #323
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRemoves an unused, feature-disabled stub module from the no_std_fs_operations lint crate while leaving the public API and feature-gated driver exports unchanged. File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
💤 Files with no reviewable changes (1)
Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. Summary
WalkthroughRemove the unused non- Changes
Poem
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 warning, 2 inconclusive)
✅ Passed checks (17 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Remove the private non-driver stub and its dead-code expectation. An empty library remains valid when the `dylint-driver` feature is disabled, so the stub provides no compatibility surface.
0d6c882 to
6f00006
Compare
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
The no_std_fs_operations crate builds as an empty library when the dylint-driver feature is disabled, but that configuration is never exercised by the existing suite: the UI tests run only under dylint-driver and the workspace test invocation uses --all-features. The removed stub was the only guard that the feature-disabled build stayed warning-free. Add an integration test that runs a nested cargo check with --no-default-features --lib against an isolated target directory, asserting the build succeeds with warnings denied and emits no compiler diagnostics. This locks in the empty-library configuration so the dead-code-expectation removal cannot regress unverified.
|
Warning Your free Security trial is over. An organization admin can activate billing to continue. |
|
@coderabbitai Have the following failed checks now been resolved? If further work is required, please provide an AI agent prompt for the remaining work to be done to address these failures. Do not treat warnings as optional or aspirational. Where a change is out of scope for this PR, propose a GitHub issue unless one exists already. (Treat o11y, code safety, documentation and validation coverage as in scope). ❌ Failed check (1 warning)
|
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo '--- PR metadata and changed files ---'
gh pr view 323 --repo leynos/whitaker --json headRefName,baseRefName,statusCheckRollup,files \
--jq '{headRefName, baseRefName, files: [.files[].path], checks: [.statusCheckRollup[] | {name, conclusion, status}]}'
echo
echo '--- Changed-file patch ---'
gh pr diff 323 --repo leynos/whitaker --patch
echo
echo '--- Relevant manifests, CI, and test configuration ---'
fd -a '^(Cargo\.toml|.*\.ya?ml|.*\.yml|.*\.rs)$' . \
| rg '(no_std_fs_operations|github/workflows|Cargo\.toml$)' \
| sort
echo
echo '--- no_std_fs_operations references and no-default-features commands ---'
rg -n -i -C 3 \
'(no_std_fs_operations|no-default-features|trybuild|dylint-driver)' \
-g 'Cargo.toml' -g '*.rs' -g '*.yml' -g '*.yaml' -g 'Justfile' -g 'Makefile' . || trueLength of output: 132227
PR The new test runs:
The test uses an isolated target directory. It fails if the command fails. It also fails if Cargo reports compiler diagnostics. This validates the empty-library configuration after removal of the non-driver stub. The PR checks are successful, including Do not create a follow-up issue. Do not perform further work for this warning. You are interacting with an AI system. |
Summary
This branch removes the private, unused non-driver stub from the
no_std_fs_operationslint crate. The crate remains a valid empty library whenthe
dylint-driverfeature is disabled, so retaining a dead-code expectationwould hide an implementation artefact rather than preserve a compatibility
surface.
Closes #322.
Review walkthrough
crates/no_std_fs_operations/src/lib.rsto confirm that the feature-gated driver modules remain unchanged and the
unnecessary private stub is gone.
Validation
cargo check -p no_std_fs_operations --no-default-features: passed.make check-fmt: passed.make lint: passed.make test: passed, with 1,624 tests passed and 5 skipped.References
Summary by Sourcery
Remove the unjustified dead-code workaround and guard the feature-disabled library build with a regression test.
Enhancements:
no_std_fs_operationslibrary while preserving its feature-disabled build behavior.Tests:
dylint-driverfeature and emits no compiler diagnostics with warnings denied.