Description
Problem
I'm using a shared target directory for a CI runner that allows to run builds (fmt, clippy, doc, build, etc) concurrently. Incremental builds are disabled.
Since the sharing target the builds are failing sporadically with usually with compile errors like this:
error[E0463]: can't find crate for
eyre
And eyre
hasn't been touched for a while. What I found so far is the following case. Two CI jobs was executing simultaneously on the same runner:
cargo nextest run --profile ci --all-targets --all-features
<-- building just the first targetcargo test --doc --all-features
<-- building doc test for some crate (after running same nextest cmd and built defaulttest
target)
The project is a workspace with lots of members. The compile error for the first job is no method named <func> found for .. in the current scope
and the commit for the second jobs actually removes this function, which lead me to conclusion this setup does not work correctly. Apparently locks only held only per-target basis thus leading to race condition where dependency has been overwritten.
So far I'm not sure it's a bug really but at least there's #2486 which led me thinking the setup should work.
Version
cargo 1.77.2 (e52e36006 2024-03-26)
.
Metadata
Metadata
Assignees
Type
Projects
Status