Conversation
|
One quick remark: I think we shoudl fall back to the |
| temp_file | ||
| .as_file() | ||
| .try_clone() | ||
| .map_err(FetchRepoDataError::IoError)?, |
There was a problem hiding this comment.
Can this happen? Just wondering :)
There was a problem hiding this comment.
I guess the clone operation can fail if https://man7.org/linux/man-pages/man2/fcntl.2.html will return something unexpected which will be converted by https://docs.rs/cvt/latest/cvt/.
don't know what are the triggers for this
There was a problem hiding this comment.
Same here! Use into_parts to forgo to the try_clone
There was a problem hiding this comment.
I think I cannot do it here.
HashingWriter::<_, Blake2b256>::new(file); take ownership of the file.
If I will do temp_file.into_parts() I will lose this file handle when creating it from_parts so later, I will not be able to create NamedTempFile again.
tdejager
left a comment
There was a problem hiding this comment.
Looking, good just a few minor nits.
Co-authored-by: Tim de Jager <tdejager89@gmail.com>
| temp_file | ||
| .as_file() | ||
| .try_clone() | ||
| .map_err(FetchRepoDataError::IoError)?, |
There was a problem hiding this comment.
Same here! Use into_parts to forgo to the try_clone
Add `RunExportsCache` entity for storing run_exports.json This PR introduces a new `RunExportsCache` entity that stores `run_exports.json` files on disk. This will allow rattler-build to access only the `run_exports.json` from archives instead of unpacking entire packages, which resolves issues on Windows. Implementation details: - Used in prefix-dev/rattler-build@main/src/run_exports.rs#L99 - Provides URL fetching with retry policy (similar to PackageCache) - Focuses only on run_exports.json retrieval (unlike PackageCache) - Uses atomic file replacement via NamedTempFile::persist, eliminating need for filesystem locks Future benefit: Optimizes package handling by avoiding full package extraction when only run_exports.json is needed.
Description
Add
RunExportsCacheentity for storing run_exports.jsonThis PR introduces a new
RunExportsCacheentity that storesrun_exports.jsonfiles on disk.This will allow rattler-build to access only the
run_exports.jsonfrom archives instead ofunpacking entire packages, which resolves issues on Windows.
Implementation details:
Future benefit: Optimizes package handling by avoiding full package extraction when only
run_exports.json is needed.