Skip to content

fix(cli): ship the logo with the published crate - #1459

Merged
jdx merged 1 commit into
mainfrom
claude/package-the-logo
Sep 21, 2026
Merged

jdx merged 1 commit into
mainfrom
claude/package-the-logo

Conversation

@jdx

@jdx jdx commented Sep 21, 2026 •

Copy link
Copy Markdown
Owner

https://entire.io/gh/jdx/usage/trails/14

v6.11.0 failed to publish. cargo package verifies a tarball by building it, and src/cli/logo.txt was not in the tarball:

error: couldn't read `src/cli/logo.txt`: No such file or directory (os error 2)
  --> src/cli/mod.rs:46:12
   |
46 |     logo = include_str!("logo.txt"),
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^
error: could not compile `usage-cli` (lib) due to 1 previous error
error: failed to verify package tarball

A published crate is built from its include list 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/**/*.txt now sits next to it, the way usage-lib's list already carries /src/**/*.tera for 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, and logo.txt is 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 package for the CLI crate.

Overview
Fixes usage-cli publish verification by adding /src/**/*.txt to the crate include list so src/cli/logo.txt is shipped in the .crate tarball.

The CLI embeds that file via include_str! in src/cli/mod.rs; without it on the include list, cargo package builds a tarball that fails to compile during verify (as blocked v6.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

  • Chores
    • Published crates now include all text resource files used by the command-line package.

`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>
@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

Understand this PR’s impact

Explore downstream dependencies and potential security impact with Blast Radius.

View blast radius →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Advanced

Run ID: 160422f3-9747-4416-8020-05345c623c96

📥 Commits

Reviewing files that changed from the base of the PR and between eb14c00 and 61e76c8.

📒 Files selected for processing (1)
  • cli/Cargo.toml

Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review.


📝 Walkthrough

Walkthrough

The usage-cli package configuration now includes /src/**/*.txt files in published crates.

Changes

CLI packaging

Layer / File(s) Summary
Package resource inclusion
cli/Cargo.toml
The package include list now includes all /src/**/*.txt files.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Suggested reviewers: mise-en-dev

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: including the CLI logo in the published crate.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge and directly resolves the reported Cargo package verification failure.

Summary

This PR fixes publication of the usage-cli crate by adding source-adjacent text files to its Cargo package include list, ensuring the logo referenced through include_str! is present when Cargo verifies the packaged tarball.

  • Adds /src/**/*.txt alongside the existing Rust source include.
  • Ships src/cli/logo.txt in the published crate.
  • Follows the resource-extension packaging convention already used by the workspace’s library crate.

Reviews (1) · Last reviewed commit: "fix(cli): ship the logo with the publish..."

@jdx
jdx merged commit 0676af0 into main Sep 21, 2026
13 checks passed
@jdx
jdx deleted the claude/package-the-logo branch September 21, 2026 16:10
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