Vendor crates through fetchCargoVendor - #24
Conversation
cargoLock fetches every crate from crates.io/api, which now answers 403 to the curl User-Agent nix sends, so any store miss fails the build. fetchCargoVendor pulls from the static.crates.io CDN. Refs rainlanguage/rainix#377 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V8ViHcKLVk2YoS2joH4HdN
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughThe Nix package now vendors Rust dependencies with ChangesRust dependency vendoring
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to This packaging-only change switches dependency retrieval to the static crates.io CDN with fixed-output hashing; no concrete build or runtime failure is established. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
Refs rainlanguage/rainix#377
What
cargoLockreplaced bycargoDeps = fetchCargoVendorwith the vendor hash. Same move rainix made forrainix-staticandwasm-bindgen-cli.Why
cargoLockfetches every crate fromcrates.io/api/v1/crates/<name>/<version>/download, which now answers 403 to any User-Agent starting withcurl/, and nixpkgsfetchurlsendscurl/<v> Nixpkgs/<v>. Every consumer that has to rebuildrainon a store miss (raindex git-clean on main, and every local devshell for rain.dia, rain.flare, rain.pyth, rain.merkle, rainlang, rainlang.deploy, rain.erc4626.words this weekend) fails withcannot download crate-<name>.tar.gz from any mirror.fetchCargoVendordownloads from the static.crates.io CDN, which has no User-Agent gate.QA
curl/8.11.1 Nixpkgs/25.11and 302 forNixpkgs/25.11;nix build .#rainon this branch fetched the vendor set and produced the binary on a host where the cargoLock path 403s.Local:
nix build .#rainsucceeds, vendor hashsha256-TrZzMmDnC07lhfjKdKfwNtrzbeRcxKewqTqmiZD2fic=. Consumers pick this up on their next flake.lock bump of theraininput.🤖 Generated with Claude Code
https://claude.ai/code/session_01V8ViHcKLVk2YoS2joH4HdN
Summary by CodeRabbit