Skip to content

fix(crates): ship the README with every published crate - #219

Open
LeadcodeDev wants to merge 1 commit into
mainfrom
fix/crate-readme
Open

fix(crates): ship the README with every published crate#219
LeadcodeDev wants to merge 1 commit into
mainfrom
fix/crate-readme

Conversation

@LeadcodeDev

Copy link
Copy Markdown
Owner

crates.io shows "rustmotion v0.7.0 appears to have no README.md file", and the
same is true of the three sibling crates.

Why

Cargo looks for the readme inside the package directory. README.md lives at
the repository root — outside all four crates — and none of them declared a
readme field, so cargo looked, found nothing, and published without one.

This is the same family as the theme files (#216) and the skills tree (#217):
something reaching outside its own crate, invisible until a tarball is built.
Fourth instance.

The fix

readme = "../../README.md"

Cargo accepts the path, copies the file into the tarball, and rewrites it to
readme = "README.md" in the published manifest. Verified on the produced
archive: the entry is the real 68,532-byte file, not a stub.

No duplicate, no symlink, and README.md stays at the repository root where
GitHub renders it. Added to all four published crates — rustmotion-core,
rustmotion-components, rustmotion-html and rustmotion — since every one of
them shows the same empty page today.

Ships as 0.7.1

0.7.0 is already on crates.io and a published version cannot be amended, so the
readme only becomes visible on the next release. The workspace is bumped here.

Verification

cargo fmt --all --check clean
cargo clippy --workspace --all-targets -- -D warnings clean
cargo test --workspace 1241 passed, 0 failed
cargo publish --workspace --dry-run exit 0
tarball contents README.md present in all four 0.7.1 archives

Noted along the way

cargo publish --workspace warns rather than fails on a version that already
exists on the index:

warning: crate rustmotion@0.7.0 already exists on crates.io index

That answers a question left open since the 0.6.0 recovery, where the behaviour
was unknown and a version was burned to avoid finding out.

crates.io shows 'rustmotion v0.7.0 appears to have no README.md file'. Cargo
looks for the readme inside the package directory, and README.md lives at the
repository root — outside all four crates — so it was never archived. None of
them declared a readme field either, so cargo looked, found nothing, and
published without one.

readme = "../../README.md" is enough: cargo copies the file into the tarball and
rewrites the path to README.md in the published manifest. No duplicate, no
symlink, and the file stays where GitHub renders it.

Same family as the theme files and the skills tree: code or metadata reaching
outside its own crate, invisible until something builds a tarball.

Ships as 0.7.1 — 0.7.0 is already on crates.io and a published version cannot be
amended.
@LeadcodeDev LeadcodeDev added the bug Something isn't working label Aug 20, 2026
@LeadcodeDev LeadcodeDev self-assigned this Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant