Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Cargo (Rust)

cargo-001 easy

Commit: a96e747227

Task prompt

Fix cargo check to not panic when using build-dir config with a workspace containing a proc macro that depends on a dylib crate. The code in compilation\_files.rs calls .expect("artifact-dir was not locked") but artifact-dir is never locked for check builds. Replace the .expect() calls with ? to propagate the None gracefully instead of panicking.

ApproachTests PassPrecisionRecallF1DurationCost
no-bobbin100.0%100.0%100.0%100.0%5.2m$1.04
with-bobbin100.0%100.0%100.0%100.0%4.6m$1.03

cargo-001_duration.svg

Ground truth files: src/cargo/core/compiler/build_runner/compilation_files.rs, tests/testsuite/check.rs

Files touched (no-bobbin): src/cargo/core/compiler/build_runner/compilation_files.rs, tests/testsuite/check.rs Files touched (with-bobbin): src/cargo/core/compiler/build_runner/compilation_files.rs, tests/testsuite/check.rs