Conversation
Extract collect_cache_entries_from(cache_dir, pattern) as a testable core of collect_cache_entries and cover regular/scoped packages, name/version wildcards, and deterministic name+version sorting (pinning lexical version order with a 10.0.0 fixture) against an unordered layout. Behavior unchanged.
Author
elrrrrrrr
reviewed
Aug 9, 2026
Contributor
|
需要 e2e 验证 case |
Revert the collect_cache_entries_from extraction (avoid a one-line wrapper per code-guard A18) and cover cache matching with subprocess e2e tests against the real binary via UTOO_CACHE_DIR: regular/scoped patterns, name/version wildcards, deterministic output order (pinned with a 10.0.0 lexical-sort fixture) and the no-match empty-summary path.
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.
Closes #3169
Summary
Expand test coverage for
utoo cleancache matching. Extractcollect_cache_entries_from(cache_dir, pattern)as a testable core ofcollect_cache_entries(the global cache dir is process-config state) and cover regular/scoped packages, wildcards, and deterministic sorting. Behavior unchanged.Changes
collect_cache_entries_from(cache_dir, pattern)fromcollect_cache_entries@types/node), scoped wildcards, name/version wildcards and scoped+version specs10.0.0fixture pinning lexical version orderingTest Plan
cargo test -p utoo-pm: 8 new tests passutoo clean <pattern> -yagainst a tempUTOO_CACHE_DIRmatches and lists entries in the same sorted order