[worker:deadcode:rust] suppress false-positive machete build-deps in remote-proto - #1169
Merged
bryan-minimal merged 2 commits intoAug 7, 2026
Merged
Conversation
prost-build and tonic-prost-build are build-time codegen deps invoked from build.rs; cargo-machete's source scan flags them as unused even though they are required. Add them to the [package.metadata.cargo-machete] ignored list alongside the runtime deps. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe change expands ChangesRemote protocol dependency metadata
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related issues
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
bryan-minimal
enabled auto-merge (squash)
August 6, 2026 16:11
twitchyliquid64
approved these changes
Aug 7, 2026
bryan-minimal
deleted the
chore/remote-proto-machete-build-deps-1799a26e1b213d2e
branch
August 7, 2026 20:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves the dead-code finding in
#1157. cargo-machete flagged two[build-dependencies]ofremote-proto—prost-buildandtonic-prost-build— as unused, but both are false positives: they are build-time codegen deps invoked directly fromcrates/remote-proto/build.rs(prost_build::compile_protos()at line 11,tonic_prost_build::configure().compile_protos()at line 25) to compile the.protofiles. cargo-machete's source scan does not trace them, so removing them would break the build.What changed
crates/remote-proto/Cargo.toml— extended the existing[package.metadata.cargo-machete]ignoredlist to includeprost-buildandtonic-prost-build, matching the pattern already used to suppress the runtime deps (prost,prost-types,tonic,tonic-prost). Updated the explanatory comment to cover the build-time reason.This is a metadata-only edit: no dependency was added or removed,
[dependencies]/[build-dependencies]are unchanged, andCargo.lockis untouched. No.rssource was modified.Verification
My
cargo build --workspace --all-targetsself-check from./targetpassed (finished clean; metadata-only change, so compilation is unaffected). No.rsfile was touched, so nocargo fmtwas required. The non-bypassable host backstop still re-runs the full gate before this PR opens:cargo fmt --all --check,cargo build --workspace --all-targets --locked,cargo clippy --workspace --all-targets --locked -- -D warnings, andcargo test --workspace --all-targets --locked.Closes #1157
Note
Suppress false-positive cargo-machete warnings for build deps in
remote-protoAdds
prost-buildandtonic-prost-buildto the[package.metadata.cargo-machete]ignored list in Cargo.toml, which previously triggered false-positive "unused dependency" warnings. Expands the inline comment to clarify the distinction between runtime and build-time deps.Macroscope summarized 07e3d09.
Summary by CodeRabbit