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
I would like to make use of cargo-chief in the CI for unit tests stage, so I've prepared the docker image for the CI pipeline containing following two directives:
RUN cargo chef cook --clippy --all-targets --all-features --recipe-path recipe.json
RUN cargo chef cook --tests --benches --all-features --recipe-path recipe.json
In the pipeline I copy all the sources into the /app directory (where commands above took place) and run the CI commands. Clippy stage works like a charm - only my project is checked. When it comes to the unit test stage it runs the following command:
cargo nextest run --all-features --profile ci --config-file=.cargo/nextest.toml
But it does the compilation of all the dependencies. Only the downloading is skipped.
I wonder if I'm doing something wrong or nextest is incompatible with the cargo-chief?
I noticed the same thing when trying to build cargo-nextest. I noticed that cargo-chef changes the Cargo.lock lockfile when running cargo chef prepare: specifically, it changes the version fields of a few dependencies to 0.0.1. I'm not 100% sure this is the cause, but at least cargo vendor --locked fails because it considers the lockfile to be out of date.
Activity
kylewlacy commentedon May 11, 2025
I noticed the same thing when trying to build cargo-nextest. I noticed that cargo-chef changes the
Cargo.locklockfile when runningcargo chef prepare: specifically, it changes theversionfields of a few dependencies to0.0.1. I'm not 100% sure this is the cause, but at leastcargo vendor --lockedfails because it considers the lockfile to be out of date.With cargo-nextest v0.9.95 here's the diff I got when using cargo-chef v0.1.71: