Make fetchTarball lazy#468
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughfetch() now mounts tarball inputs via an input-cache pipeline when unpacking; otherwise it downloads files directly and, if provided, verifies Flat SHA256 before returning the store path. Changesfetch() URL download path refactoring
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~18 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/libexpr/primops/fetchTree.cc`:
- Around line 455-461: The Input for the tarball fetch drops the previously
parsed/validated name, breaking fetchTarball's contract and altering
expectedPath; update the attrs passed to fetchers::Input::fromAttrs so it
includes the parsed name when present (i.e. add the "name" attribute alongside
"type","url" and optional "narHash"), preserving the precomputed expectedPath
behavior used by fetchTarball and ensuring the attribute key matches callers
that read the name.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: b49482ab-cc70-4220-9fa2-44fafff3cfb1
📒 Files selected for processing (1)
src/libexpr/primops/fetchTree.cc
Motivation
This makes
fetchTarballfaster by (possibly) avoiding an unnecessary copy to the Nix store.Context
Summary by CodeRabbit
Bug Fixes
Refactor