Let the image build see the dependency Cargo patches #27

Merged
jcoffey-dev merged 1 commits from fix/vendor-in-build-context into main 2026-09-23 04:48:35 +00:00
Owner

The rename pass vendored a patched sieve-rs and pointed Cargo.toml's [patch.crates-io] at vendor/sieve-rs, but .dockerignore re-includes a short allowlist that did not have vendor on it. The image build therefore had no such directory and stopped at "failed to load source for dependency sieve-rs".

CI cannot see that class of problem: it builds from a checkout, and only the image build has a context to prune. So this also adds tools/fork/context-check.py, which asserts that every path a [patch] section names exists and survives .dockerignore.

The rename pass vendored a patched sieve-rs and pointed Cargo.toml's [patch.crates-io] at vendor/sieve-rs, but .dockerignore re-includes a short allowlist that did not have vendor on it. The image build therefore had no such directory and stopped at "failed to load source for dependency sieve-rs". CI cannot see that class of problem: it builds from a checkout, and only the image build has a context to prune. So this also adds tools/fork/context-check.py, which asserts that every path a [patch] section names exists and survives .dockerignore.
jcoffey-dev added 1 commit 2026-09-23 04:44:00 +00:00
Let the image build see the dependency Cargo patches
ci / fork-checks (pull_request) Successful in 49s
ci / build (pull_request) Successful in 4m22s
238079da66
The rename pass vendored a patched sieve-rs and pointed Cargo.toml's
[patch.crates-io] at vendor/sieve-rs. .dockerignore ignores everything and
re-includes a short list that did not have vendor on it, so the image build
had no such directory and stopped at

    failed to load source for dependency `sieve-rs`
    failed to read /build/vendor/sieve-rs/Cargo.toml

CI could not have caught that: it builds from a checkout, where the
directory is simply there, and only the image build has a context to prune.
The first that was known about it was a tag that had already been pushed.

So: vendor is re-included, and tools/fork/context-check.py now asserts the
thing that was quietly assumed -- every path a [patch] section names exists
and survives .dockerignore. It runs beside the other fork checks and takes
no toolchain.

Also, the comments in .dockerignore started with // , which Docker does not
read as a comment: they were patterns that happened to match nothing. They
are # now.
jcoffey-dev merged commit d7c9416713 into main 2026-09-23 04:48:35 +00:00
jcoffey-dev deleted branch fix/vendor-in-build-context 2026-09-23 04:48:36 +00:00
jcoffey-dev referenced this issue from a commit 2026-09-23 05:40:20 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: inbuxa/inbuxa-server#27