fix(crates): ship the README with every published crate - #219
Open
LeadcodeDev wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.mdlives atthe repository root — outside all four crates — and none of them declared a
readmefield, 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
Cargo accepts the path, copies the file into the tarball, and rewrites it to
readme = "README.md"in the published manifest. Verified on the producedarchive: the entry is the real 68,532-byte file, not a stub.
No duplicate, no symlink, and
README.mdstays at the repository root whereGitHub renders it. Added to all four published crates —
rustmotion-core,rustmotion-components,rustmotion-htmlandrustmotion— since every one ofthem 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 --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspacecargo publish --workspace --dry-runREADME.mdpresent in all four 0.7.1 archivesNoted along the way
cargo publish --workspacewarns rather than fails on a version that alreadyexists on the 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.