You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@LukeMathWalker Using target detection from cargo-metadata is probably useful anyway, but is this specific issue indeed a problem? cargo cook should be invoked from an empty directory containing only recipe.json. In that case, cargo chef will create the wrong benchmark file, but it should be fine for building dependencies.
The problem only happens when user code is copied over and then there are two copies of the same benchmark file, which causes conflicts. Maybe it would be enough to just delete the benches directory after cooking?
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:
In this example,
benches/ldbc-graphalytics.rs
is the created dummy file.The text was updated successfully, but these errors were encountered: