feat: Verify conda package's sha256 or md5 from pixi.lock#260
Open
e8035669 wants to merge 6 commits intoQuantco:mainfrom
Open
feat: Verify conda package's sha256 or md5 from pixi.lock#260e8035669 wants to merge 6 commits intoQuantco:mainfrom
e8035669 wants to merge 6 commits intoQuantco:mainfrom
Conversation
pavelzw
reviewed
Feb 10, 2026
src/pack.rs
Outdated
| } | ||
|
|
||
| if let Some(sha256hash) = package.package_record.sha256 { | ||
| let output = compute_file_digest::<Sha256>(&output_path)?; |
Member
There was a problem hiding this comment.
how about we compute the hashes in-flight like we do in conda-mirror?
this is more memory efficient and doesn't require us reading the file multiple times
Contributor
Author
There was a problem hiding this comment.
OK. I refactor to compute the hashes in-flight. It looks better than before.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
closes #217
Changes
Explicitly calltokio::File::flush()before dropping theFileobject, as the documentation notes that "a file will not be closed immediately when it goes out of scope".Userattler_digest::compute_file_digest()to verify the file checksum (SHA-256 or MD5) when a corresponding digest is available.tokiofeature forrattler_digestto enable async I/O support.rattler_digest::HashingWriterto verify the file checksum (SHA-256 or MD5) when a corresponding digest is available.If updating documentation: