Repository navigation
fix(cli): ship the logo with the published crate - #1459
Conversation
`v6.11.0` failed to publish: `cargo package` verifies the tarball by building
it, and `src/cli/logo.txt` was not in the tarball, so the `include_str!` that
reads it could not find it.
error: couldn't read `src/cli/logo.txt`: No such file or directory
--> src/cli/mod.rs:46:12
|
46 | logo = include_str!("logo.txt"),
A published crate is built from the `include` list alone, and that list covered
`/src/**/*.rs` — every file the CLI had until this one. `/src/**/*.txt` is
beside it now, as usage-lib's list already carries `/src/**/*.tera` for the
templates that sit next to its code.
Verified the way it should have been the first time: `cargo package -p
usage-cli` builds the tarball and compiles it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Understand this PR’s impact Explore downstream dependencies and potential security impact with Blast Radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe ChangesCLI packaging
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
https://entire.io/gh/jdx/usage/trails/14
v6.11.0failed to publish.cargo packageverifies a tarball by building it, andsrc/cli/logo.txtwas not in the tarball:A published crate is built from its
includelist alone, and that list covered/src/**/*.rs— which was every file usage-cli had until the logo arrived as a text file beside the code./src/**/*.txtnow sits next to it, the way usage-lib's list already carries/src/**/*.terafor the templates beside its code.Nothing else in the release is affected: the logo is the only non-Rust file added to a published crate, and the tag was never cut, so 6.11.0 has not gone out half-published. release-plz retries the publish on the next push to main.
Validation
cargo package -p usage-cli— which builds the tarball and compiles it — now succeeds, andlogo.txtis present in the.crate. That is the check that would have caught this before the release PR merged, and it is the one I skipped.🤖 Generated with Claude Code
Note
Low Risk
Packaging-only change; no runtime behavior beyond restoring successful
cargo packagefor the CLI crate.Overview
Fixes
usage-clipublish verification by adding/src/**/*.txtto the crateincludelist sosrc/cli/logo.txtis shipped in the.cratetarball.The CLI embeds that file via
include_str!insrc/cli/mod.rs; without it on the include list,cargo packagebuilds a tarball that fails to compile during verify (as blockedv6.11.0).Reviewed by Cursor Bugbot for commit 61e76c8. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit