From db217e7db23133e332f98a6553d063edddcefaa0 Mon Sep 17 00:00:00 2001 From: aaltshuler Date: Sun, 5 Jul 2026 18:50:52 +0300 Subject: [PATCH] fix(bench): restore the cfg(unix) gate displaced by the results-log insertion Both review bots caught it: the new fns were inserted between run_once's cfg(unix) attribute and the fn itself, leaving append_result, git_sha, and run_once ungated (non-unix name-resolution break, again). All three gated; results_path keeps the displaced attribute. --- crates/omnigraph/benches/scenarios.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/omnigraph/benches/scenarios.rs b/crates/omnigraph/benches/scenarios.rs index d3855721..05ffa751 100644 --- a/crates/omnigraph/benches/scenarios.rs +++ b/crates/omnigraph/benches/scenarios.rs @@ -187,6 +187,7 @@ fn results_path(args: &Args) -> std::path::PathBuf { std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("benches/results.jsonl") } +#[cfg(unix)] fn append_result(args: &Args, record: &serde_json::Value) { let path = results_path(args); let appended = std::fs::OpenOptions::new() @@ -202,6 +203,7 @@ fn append_result(args: &Args, record: &serde_json::Value) { } } +#[cfg(unix)] fn git_sha() -> Option { let out = std::process::Command::new("git") .args(["rev-parse", "--short", "HEAD"]) @@ -213,6 +215,7 @@ fn git_sha() -> Option { .then(|| String::from_utf8_lossy(&out.stdout).trim().to_string()) } +#[cfg(unix)] fn run_once(args: &Args, run: usize) -> serde_json::Value { let exe = std::env::current_exe().expect("current_exe"); let mut child = std::process::Command::new(exe)