Closed
Conversation
This pull request was closed.
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.
Description (What)
Syncpack now returns the same package manifests while doing substantially less filesystem work.
With workspace sources such as
apps/*andlibs/*, discovery previously descended into every nonignored root directory and every directory below each project, then discarded files that could not match. It now descends only throughapps,libs, and their immediate workspace directories. Unrelated caches and deeper paths such asapps/web/srcare not traversed.The walker derives safe directory prefixes from positive source globs, leaves root and nested gitignore handling independent, and applies complete source matching to files afterward. Recursive sources such as
apps/**remain recursive. Patterns that cannot be safely analyzed fall back to the previous broad traversal, avoiding false negatives.Justification (Why)
Large generated trees could dominate runtime and trigger thousands of unnecessary filesystem inspections, including endpoint-protection interception, despite being unable to contain a matching manifest. This makes discovery proportional to bounded workspace paths without changing command results or configuration.
How Can This Be Tested?
cargo test --locked -- --nocapture --color=alwayscargo clippy --tests --verbose -- -D warningscargo fmt --all -- --check --verboseRegression, differential, and traversal-property checks cover bounded, recursive, negated, ambiguous, dotfile, custom JSON, and gitignored sources.
Benchmarks
Hyperfine on the same host. Release rows used 5 warmups and 30 runs; the debug traversal row used 2 warmups and 10 runs.
Closes #338.