cargo-chef
cargo-chef copied to clipboard
Builds faililng due to incorrect dummy files generated for benches
Cargo allows benchmarks to be created with two possible filesystem layouts:
-
benches/<benchfile.rs>
-
benches/<benchmark>/{main.rs, <other rust files>}
.
See for example: https://github.com/vmware/database-stream-processor/tree/main/crates/dbsp/benches
Using cargo chef on such a project structure creates skeletons of type 1) for benchmark layouts of type 2), causing builds to fail with errors like:
#16 5.600 error: failed to parse manifest at `/app/crates/dbsp/Cargo.toml`
#16 5.600
#16 5.600 Caused by:
#16 5.600 cannot infer path for `ldbc-graphalytics` bench
#16 5.600 Cargo doesn't know which to use because multiple target files found at `benches/ldbc-graphalytics.rs` and `benches/ldbc-graphalytics/main.rs`.
#16 5.601 [cargo-make] ERROR - Error while executing command, exit code: 101
#16 5.601 [cargo-make] WARN - Build Failed.
In this example, benches/ldbc-graphalytics.rs
is the created dummy file.