Skip to content

Fix README path in hypersync-client crate documentation#125

Merged
JonoPrest merged 6 commits into
mainfrom
claude/fix-cargo-publish-1XAO4
Mar 27, 2026
Merged

Fix README path in hypersync-client crate documentation#125
JonoPrest merged 6 commits into
mainfrom
claude/fix-cargo-publish-1XAO4

Conversation

@JonoPrest
Copy link
Copy Markdown
Collaborator

@JonoPrest JonoPrest commented Mar 27, 2026

Summary

This PR fixes the documentation include path for the hypersync-client crate to correctly reference the root README.md file.

Changes

  • Updated the doc include path in lib.rs from ../../README.md to ../README.md to correctly point to the repository root README
  • Added readme = "README.md" field to Cargo.toml to properly declare the README for crate documentation
  • Created a symlink/reference file at hypersync-client/README.md pointing to the root README

Details

The previous path ../../README.md was incorrect for the crate's directory structure. The corrected path ../README.md now properly resolves to the root README file. The addition of the readme field in Cargo.toml ensures that documentation tools and crate registries correctly identify and display the README for this crate.

https://claude.ai/code/session_01DVaxp2hHUaEaSpjsfLM7tE

Summary by CodeRabbit

  • Chores
    • Updated package metadata and documentation configuration.

The `include_str!("../../README.md")` in lib.rs resolved correctly in the
workspace but failed during `cargo publish` verification because the packaged
tarball doesn't preserve the workspace directory structure. Fixed by:
- Adding a symlink from hypersync-client/README.md to the root README.md
- Changing include_str! to use "../README.md" (relative to src/lib.rs)
- Adding readme = "README.md" to Cargo.toml

Co-authored-by: claude <noreply@anthropic.com>

https://claude.ai/code/session_01DVaxp2hHUaEaSpjsfLM7tE
Use readme field in Cargo.toml pointing to root README instead of
include_str! which breaks during cargo publish verification since the
packaged tarball doesn't preserve the workspace directory structure.
The README still displays on crates.io and docs.rs via the readme field.

Co-authored-by: claude <noreply@anthropic.com>

https://claude.ai/code/session_01DVaxp2hHUaEaSpjsfLM7tE
Add a symlink at hypersync-client/README.md -> ../README.md so that
include_str!("../README.md") in lib.rs resolves correctly both locally
(via the symlink to the root README) and in the published package
(cargo resolves the symlink and copies the file content into the tarball).

This keeps the README in cargo doc output while fixing cargo publish.

Co-authored-by: claude <noreply@anthropic.com>

https://claude.ai/code/session_01DVaxp2hHUaEaSpjsfLM7tE
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 27, 2026

Warning

Rate limit exceeded

@JonoPrest has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 5 minutes and 53 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 5 minutes and 53 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 32014ffe-5467-40c6-863e-461188c59f82

📥 Commits

Reviewing files that changed from the base of the PR and between 0911f49 and fe6bfe9.

📒 Files selected for processing (3)
  • .github/workflows/ci.yaml
  • hypersync-client/Cargo.toml
  • hypersync-client/src/lib.rs
📝 Walkthrough

Walkthrough

This pull request updates the hypersync-client crate's README configuration by creating a local README.md file that references the parent directory's README, updating Cargo.toml to declare this README in package metadata, and adjusting the doc include path in lib.rs accordingly.

Changes

Cohort / File(s) Summary
README Configuration
hypersync-client/Cargo.toml, hypersync-client/README.md, hypersync-client/src/lib.rs
Added readme field to package manifest, created new README.md that references parent README, and updated doc include path from ../../README.md to ../README.md.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • #124 - Repoints the crate README/include path to ../README.md, causing the embedded documentation content to reference the updated file location.
  • #119 - Makes the crate embed and point to ../README.md through hypersync-client/README.md and modifications to lib.rs/Cargo.toml, sharing the same README file reference.

Suggested reviewers

  • JasoonS
  • keenbeen32

Poem

🐰 A hop and a skip, the READMEs align,
One points to the other, so perfectly fine,
Cargo declares what the docs now display,
File paths reorganized in a crate-y way! 📚

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix README path in hypersync-client crate documentation' accurately summarizes the main change: correcting the README path in the hypersync-client crate from ../../README.md to ../README.md.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/fix-cargo-publish-1XAO4

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 and usage tips.

Remove the release-mode build/test job and add a package job that runs
cargo package on all publishable crates. This catches publish-time
issues (like the README path resolution bug) in CI before they hit
the publish workflow.

Co-authored-by: claude <noreply@anthropic.com>

https://claude.ai/code/session_01DVaxp2hHUaEaSpjsfLM7tE
Comment thread .github/workflows/ci.yaml
- name: Test
run: cargo test

test_release:
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I felt this wasn't important. We don't have any codedifferences in our release target and debug target. We also don't have any known gotchas with opimization that makes a test with release worth doing in addition to test with debug.

Comment thread .github/workflows/ci.yaml
Comment on lines +49 to +52
cargo package -p hypersync-format
cargo package -p hypersync-schema
cargo package -p hypersync-net-types
cargo package -p hypersync-client
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I introduced a bug into cargo publish with the readme doc. So would rather swap out the test release for testing that package would publish

@JonoPrest JonoPrest merged commit b5b519e into main Mar 27, 2026
5 checks passed
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