LukeMathWalker / LukeMathWalker/cargo-chef

Builds faililng due to incorrect dummy files generated for benches

Open
#203 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Rust
Stars
2.7k
Forks
146
PR merge metrics
No merged PRs in 30d

Description

Cargo allows benchmarks to be created with two possible filesystem layouts:

  1. benches/<benchfile.rs>
  2. 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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with the two benchmark layouts under benches/ and inspect how cargo-chef generates dummy files. Use the example benches/ldbc-graphalytics layout and its Cargo.toml error as the validation case; done means skeleton generation preserves the directory-based benchmark layout without creating a conflicting benches/ldbc-graphalytics.rs file.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.