refactor: extract shared hash_content into execute/hash.rs#282
Open
yangshun wants to merge 1 commit intovoidzero-dev:mainfrom
Open
refactor: extract shared hash_content into execute/hash.rs#282yangshun wants to merge 1 commit intovoidzero-dev:mainfrom
hash_content into execute/hash.rs#282yangshun wants to merge 1 commit intovoidzero-dev:mainfrom
Conversation
Both `fingerprint.rs` and `glob_inputs.rs` implemented identical 8 KiB buffered xxHash3_64 hashing for cache invalidation. Extract into a shared `hash.rs` module to ensure consistent hashes across code paths — if either diverges, cache lookups would silently break. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
d753a7f to
f92824f
Compare
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.
Summary
Extract the 8 KiB buffered xxHash3_64 hashing logic from
fingerprint.rsandglob_inputs.rsinto a sharedexecute/hash.rsmodule.Note
I used Claude to find this duplication, reasoned with it back-and-forth to see if it was really an improvement, concluded that it was just a small one.
Both call sites were identical, but strictly speaking the logic doesn't need to be shared. If not desired, just close the PR.
Test plan
cargo test -p vite_task— all 27 tests pass