Repository navigation
Commit 7988da6
committed
Docker: copy vendor/ and pin rustc 1.95.0
Two bugs, both pre-existing, the second hidden behind the first.
1. vendor/ was never copied
The root manifest has `[patch.crates-io] chacha20 = { path = "vendor/chacha20" }`,
and both Dockerfiles do a selective COPY -- Cargo.toml, crates/, src/,
examples/, benches/ -- that never included vendor/. Cargo resolves patch entries
while LOADING THE MANIFEST, before features and before target selection, so this
is not a link-time miss; the build dies at parse:
error: failed to load source for dependency `chacha20`
Caused by: Unable to update /app/vendor/chacha20
Caused by: failed to read `/app/vendor/chacha20/Cargo.toml`
vendor/chacha20 is tracked (18 files) and not gitignored, and .dockerignore does
not exclude vendor/ -- the directory simply was never listed. The patch arrived
in 2539cad without the Dockerfiles being updated alongside it. Same failure
class as the examples/benches note already in the file, which exists because
this happened once before.
2. The image pinned rustc 1.94.0 for a crate that requires 1.95
Cargo.toml says `rust-version = "1.95"` and rust-toolchain.toml says
channel = "1.95.0", but the Dockerfiles installed 1.94.0 and asserted it. This
would have been the very next failure after fixing (1) and was invisible until
then. rust-toolchain.toml is deliberately not copied into the image -- rustup
would fetch a second toolchain at build time -- so the Dockerfile pin is the only
thing keeping the image in step with the repo, and there is now a comment saying
so and telling the next person to bump it when the toolchain moves.
Verified by reproducing the Docker context exactly (no daemon available): a
directory populated with precisely the Dockerfile's COPY list.
before, old COPY set: cargo metadata -> exit 101, the identical error
after, with vendor/: cargo metadata -> exit 0
then all three of the Dockerfile's RUN steps, on 1.95.0, with the image's
RUSTFLAGS="-C target-cpu=x86-64-v3":
cargo build --release Finished, 43.21s
cargo build --release --features jit-native Finished, 45.99s
cargo test --release --lib -- hpc:: 1732 passed, 0 failed
Not verified: an actual `docker build`. No daemon in this environment. The
simulation reproduces the reported failure byte-for-byte and clears it, and it
exercises every RUN line, but it does not cover anything specific to the debian
base image or the apt layer.
Claude-Session: https://claude.ai/code/session_01VdfbkUCBbtZhy3yjSfCDHp1 parent 6b5ca21 commit 7988da6
2 files changed
Lines changed: 27 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
23 | | - | |
24 | | - | |
| 27 | + | |
| 28 | + | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
| |||
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
33 | 46 | | |
34 | 47 | | |
35 | 48 | | |
| |||
63 | 76 | | |
64 | 77 | | |
65 | 78 | | |
66 | | - | |
| 79 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
| 24 | + | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
32 | 38 | | |
33 | 39 | | |
34 | 40 | | |
| |||
51 | 57 | | |
52 | 58 | | |
53 | 59 | | |
54 | | - | |
| 60 | + | |
0 commit comments