Fix README path in hypersync-client crate documentation#125
Conversation
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
|
Warning Rate limit exceeded
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 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis 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
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
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
| - name: Test | ||
| run: cargo test | ||
|
|
||
| test_release: |
There was a problem hiding this comment.
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.
| cargo package -p hypersync-format | ||
| cargo package -p hypersync-schema | ||
| cargo package -p hypersync-net-types | ||
| cargo package -p hypersync-client |
There was a problem hiding this comment.
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
Co-authored-by: claude <noreply@anthropic.com> https://claude.ai/code/session_01DVaxp2hHUaEaSpjsfLM7tE
Co-authored-by: claude <noreply@anthropic.com> https://claude.ai/code/session_01DVaxp2hHUaEaSpjsfLM7tE
Summary
This PR fixes the documentation include path for the hypersync-client crate to correctly reference the root README.md file.
Changes
lib.rsfrom../../README.mdto../README.mdto correctly point to the repository root READMEreadme = "README.md"field toCargo.tomlto properly declare the README for crate documentationhypersync-client/README.mdpointing to the root READMEDetails
The previous path
../../README.mdwas incorrect for the crate's directory structure. The corrected path../README.mdnow properly resolves to the root README file. The addition of thereadmefield 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