Skip to content

Copy the docs the binary embeds into the build stage - #28

Merged
WaylandYang merged 1 commit into
mainfrom
fix/dockerfile-missing-embedded-docs
Aug 27, 2026
Merged

WaylandYang merged 1 commit into
mainfrom
fix/dockerfile-missing-embedded-docs

Conversation

@WaylandYang

Copy link
Copy Markdown
Contributor
error: couldn't read `crates/utopia-server/src/../../../web/src/docs/ingest.md`:
       No such file or directory (os error 2)

docs_corpus.rs embeds web/src/docs/ingest.md with include_str!, which makes that file a source dependency of the backend, not a frontend asset. The Rust stage copied Cargo.toml, Cargo.lock, crates/ and migrations/ — never anything under web/ — so the compile failed outright.

This has been broken since the search_docs tool landed. Nothing in CI built a container, so the single path the README hands every reader was also the only path never exercised. Adding the release workflow is what surfaced it.

Swept for siblings: exactly one include_str! in the tree, no include_bytes!, no build.rs, and .dockerignore excludes only web/dist/, so web/src/docs/ reaches the context.

docs_corpus.rs pulls web/src/docs/ingest.md in with include_str!, which makes it
a source dependency of the backend rather than a frontend asset. The Rust stage
copied Cargo manifests, crates/ and migrations/ — never web/ — so cargo stopped
at "couldn't read .../web/src/docs/ingest.md".

This has been broken since the search_docs tool landed. Nothing built a container
anywhere, so the one path the README tells every reader to take was the only path
never exercised. Checked the rest: one include_str! in the tree, no build.rs.
@WaylandYang
WaylandYang merged commit 5278576 into main Aug 27, 2026
2 checks passed
@WaylandYang
WaylandYang deleted the fix/dockerfile-missing-embedded-docs branch August 27, 2026 17:41
WaylandYang added a commit that referenced this pull request Aug 28, 2026
docs_corpus.rs pulls web/src/docs/ingest.md in with include_str!, which makes it
a source dependency of the backend rather than a frontend asset. The Rust stage
copied Cargo manifests, crates/ and migrations/ — never web/ — so cargo stopped
at "couldn't read .../web/src/docs/ingest.md".

This has been broken since the search_docs tool landed. Nothing built a container
anywhere, so the one path the README tells every reader to take was the only path
never exercised. Checked the rest: one include_str! in the tree, no build.rs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant