cargo-chef icon indicating copy to clipboard operation
cargo-chef copied to clipboard

Caching doesn't work when `strip = "debuginfo"` is set

Open jcaesar opened this issue 2 years ago • 0 comments

Quick reproducer

cargo new foo
cd foo
cargo add rand # Example dependency

echo '                           
[profile.release]
strip = "debuginfo"' >>Cargo.toml

echo 'FROM clux/muslrust:1.63.0 AS chef
RUN cargo install cargo-chef --locked
WORKDIR /usr/src/foo

FROM chef AS planner
COPY . .
RUN cargo chef prepare

FROM chef AS builder
COPY --from=planner /usr/src/foo/recipe.json recipe.json
RUN cargo chef cook --release
COPY . .
RUN cargo build --release
' | docker build -f- .

(See that rand is built twice in the output)

jcaesar avatar Aug 16 '22 02:08 jcaesar