From e2090c4ef4e832c079395828c70e67268fea8d7b Mon Sep 17 00:00:00 2001 From: "gominimal-aw-bot[bot]" <281738952+gominimal-aw-bot[bot]@users.noreply.github.com> Date: Tue, 4 Aug 2026 00:51:01 +0000 Subject: [PATCH] chore(remote-proto): ignore false-positive machete build-deps 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 --- crates/remote-proto/Cargo.toml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/crates/remote-proto/Cargo.toml b/crates/remote-proto/Cargo.toml index 2510e5338..e5e173b91 100644 --- a/crates/remote-proto/Cargo.toml +++ b/crates/remote-proto/Cargo.toml @@ -17,6 +17,16 @@ prost-build.workspace = true tonic-prost-build.workspace = true [package.metadata.cargo-machete] -# These are consumed by the tonic/prost code generated into OUT_DIR and pulled -# in via `include!` in src/lib.rs, which cargo-machete's source scan cannot see. -ignored = ["prost", "prost-types", "tonic", "tonic-prost"] +# The runtime deps are consumed by the tonic/prost code generated into OUT_DIR +# and pulled in via `include!` in src/lib.rs, which cargo-machete's source scan +# cannot see. prost-build and tonic-prost-build are build-time codegen deps +# invoked from build.rs to compile the .proto files; cargo-machete's scan does +# not trace them either, so they are false positives too. +ignored = [ + "prost", + "prost-types", + "tonic", + "tonic-prost", + "prost-build", + "tonic-prost-build", +]