Repository navigation
Conversation
Comment on lines
+469
to
+470
| deserializer | ||
| .deserialize_any(GitPatternVisitor) |
There was a problem hiding this comment.
[P2] Preserve sequence-form Git patterns during direct dispatch
The former untagged Set(GitSet) decoder accepts cache-keys = [{ git = [true, false] }] through Serde’s sequence representation of structs; shipped uv 0.13.1 also accepts this input. Although undocumented, this form now fails because the visitor has no visit_seq. For a local dependency, CacheInfo::from_directory silently replaces failed configuration with default keys, so subsequent Git-only changes stop invalidating cached wheels. Add visit_seq forwarding to GitSet::deserialize through SeqAccessDeserializer, with a focused compatibility snapshot, to keep this optimization behavior-preserving.
woodruffw
marked this pull request as ready for review
October 19, 2026 21:44
|
Promoted to #22749. |
This branch was successfully deployed
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
Dispatch cache keys by string or table key and Git patterns by boolean, table, or sequence, avoiding untagged-enum buffering and retries. Keep strict rejection of unknown or extra fields, sequence length checks, the existing generic diagnostics, and the same JSON schema.
A focused release executable containing the actual decoder definitions shrank from 521,576 to 516,064 bytes: 5,512 bytes. For 1,200 parses of 42 mixed cache keys, median time fell from 34.15 ms to 17.90 ms across 20 measured alternating pairs. String-only and Git-table cases were also faster. These are focused probe results, not a measured full-uv reduction.
Test Plan
cargo clippy --locked --offline -p uv-cache-info --all-targets --all-features -- -D warnings.cargo test --locked --offline -p uv-cache-info --lib --all-features(10 passed).cargo --locked dev generate-json-schema --mode check: uv.schema.json is unchanged.The probes use Rust 1.99.0, opt-level 3, one codegen unit, fat LTO, panic=abort, and stripped symbols on Linux x86_64. Full-uv and production PGO size measurements remain outstanding.