Skip to content

bench_tools: delete dead code (unsure, review carefully)#14695

Open
asaf-sw wants to merge 1 commit into
mainfrom
code_slayer/remove_dead_code_in_bench_tools
Open

bench_tools: delete dead code (unsure, review carefully)#14695
asaf-sw wants to merge 1 commit into
mainfrom
code_slayer/remove_dead_code_in_bench_tools

Conversation

@asaf-sw

@asaf-sw asaf-sw commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

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_owned from bench_tools.

Why it appears dead

  • cmd_args_owned has zero references anywhere in the sequencer workspace (a whole-word grep across crates/ matches only its definition), including the crate's own main.rs, runner.rs, tests and benches.
  • Zero references in either sibling repo (starkware-industries/sequencer-devops, starkware-industries/starkware).

What a human must verify

  • The method is 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

  • The cmd_args field it read is retained — 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 cargo build -p bench_tools --tests: zero dead_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

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.
@reviewable-StarkWare

Copy link
Copy Markdown

This change is Reviewable

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.

3 participants