Register temp roots in a few places#482
Conversation
This avoids the fetched path from getting garbage collected if it is already valid.
Note: this only prevents the paths from being GCed during the copy. You still need to use `nix copy --out-link ...` to prevent GC afterwards. Less ambitious fix than NixOS#15719.
|
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 (2)
📝 WalkthroughWalkthroughAdds temporary GC root registrations to prevent garbage collection of store paths. Three closure-fetch helper functions in fetchClosure.cc now root their paths before validation; copyPaths in store-api.cc roots destination paths before the validity check loop. ChangesGC Root Registration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~4 minutes
🚥 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)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Infer (1.2.0)src/libexpr/primops/fetchClosure.ccsrc/libexpr/primops/fetchClosure.cc:1:10: fatal error: 'nix/expr/primops.hh' file not found ... [truncated 2200 characters] ... in file "src/clang/cFrontend_decl.ml" (inlined), line 54, characters 4-52 src/libstore/store-api.ccsrc/libstore/store-api.cc:1:10: fatal error: 'nix/util/logging.hh' file not found ... [truncated 2200 characters] ... ine 4784, characters 10-1023 Comment |
Motivation
Includes upstream NixOS#15720, plus a less ambitious version of NixOS#15719.
Context
Summary by CodeRabbit