From 26938e136947352aad65a3432036f0a3d95e5cd4 Mon Sep 17 00:00:00 2001 From: Mark Rousskov Date: Wed, 15 Dec 2021 09:57:19 -0500 Subject: [PATCH] Name bin target differently from lib This avoids file collisions, which lead to spurious rebuilds and errors from Cargo (recently added by rust-lang/cargo#10172). --- collector/benchmarks/token-stream-stress/Cargo.toml | 8 ++++++-- collector/benchmarks/token-stream-stress/perf-config.json | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/collector/benchmarks/token-stream-stress/Cargo.toml b/collector/benchmarks/token-stream-stress/Cargo.toml index 87f1024cd..d36252306 100644 --- a/collector/benchmarks/token-stream-stress/Cargo.toml +++ b/collector/benchmarks/token-stream-stress/Cargo.toml @@ -5,11 +5,15 @@ edition = "2018" publish = false [lib] +# Documenting the library means that we try to rebuild it after src/main.rs +# changes, as of rust-lang/cargo#10172. Since our benchmarks don't actually care +# about it being built, disable that. +doc = false path = "src/lib.rs" proc-macro = true [[bin]] -name = "token-stream-stress" +name = "token-stream-stress-bin" path = "src/main.rs" -[workspace] \ No newline at end of file +[workspace] diff --git a/collector/benchmarks/token-stream-stress/perf-config.json b/collector/benchmarks/token-stream-stress/perf-config.json index 13ef66406..43b14d8db 100644 --- a/collector/benchmarks/token-stream-stress/perf-config.json +++ b/collector/benchmarks/token-stream-stress/perf-config.json @@ -1,4 +1,4 @@ { - "cargo_opts": "--bin token-stream-stress", + "cargo_opts": "--bin token-stream-stress-bin", "touch_file": "src/main.rs" }