bench_tools: delete dead code (unsure, review carefully)#14695
Open
asaf-sw wants to merge 1 commit into
Open
Conversation
Removes the unused method `BenchmarkConfig::cmd_args_owned`. Evidence it is dead: - `cmd_args_owned` has zero references anywhere in the sequencer workspace (whole-word grep across `crates/` matches only its definition), including the crate's own `main.rs`, `runner.rs`, tests and benches. - Zero references in the sibling repos `starkware-industries/sequencer-devops` and `starkware-industries/starkware`. Scope notes: - The `cmd_args` field it read is retained: it is used directly elsewhere (`bench.cmd_args.join(..)` in `main.rs`, `.args(bench.cmd_args)` in `runner.rs`). - The sibling method `needs_inputs` is retained (it has live callers). Verification (env: RUSTC_WRAPPER unset, CARGO_INCREMENTAL=0): `cargo build -p bench_tools` and `... --tests` build with zero dead_code/unused warnings; `cargo clippy` clean; `SEED=0 cargo test` passes.
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.
Caution
REVIEW WITH CARE! THIS PR REQUIRES CAREFUL HUMAN REVIEW.
If you find this to be a false positive comment in detail why this code should be kept and close the PR.
This PR removes the unused method
BenchmarkConfig::cmd_args_ownedfrombench_tools.Why it appears dead
cmd_args_ownedhas zero references anywhere in the sequencer workspace (a whole-word grep acrosscrates/matches only its definition), including the crate's ownmain.rs,runner.rs, tests and benches.starkware-industries/sequencer-devops,starkware-industries/starkware).What a human must verify
pub. Confirm no consumer outside the three repos checked above calls it (bench_tools is internal tooling, so external use is unlikely, but I cannot fully rule it out).Scope notes
cmd_argsfield it read is retained — used directly elsewhere (bench.cmd_args.join(..)inmain.rs,.args(bench.cmd_args)inrunner.rs).needs_inputsis retained (it has live callers).Verification (env:
RUSTC_WRAPPERunset,CARGO_INCREMENTAL=0)cargo build -p bench_toolsandcargo build -p bench_tools --tests: zerodead_code/unused_*warnings.cargo clippy -p bench_tools --all-targets: clean.SEED=0 cargo test -p bench_tools: passes.Caution
REVIEW WITH CARE! THIS PR REQUIRES CAREFUL HUMAN REVIEW.
If you find this to be a false positive comment in detail why this code should be kept and close the PR.
Generated by Claude Code