Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(filter): dependencies filter should match transitive deps (#7886)
### Description Fixes bug from port where `...` filter would only select immediate dependencies. In Go we used [`graph.Ancestors`](https://github.com/vercel/turbo/blob/v1.10.3/cli/internal/scope/filter/filter.go#L182) which performs a full DFS, not just immediate ancestors. This PR updates so we do the same in Rust. ### Testing Instructions Added unit test that uses `...` filter on a project with transitive dependencies. We already have test cases for the reverse case of [including reverse dependants](https://github.com/vercel/turbo/blob/main/crates/turborepo-lib/src/run/scope/filter.rs#L806) For good measure did a manual check in repo with following dep chain: `docs -> @repo/ui -> foo` ``` [0 olszewski@chriss-mbp] /tmp/dingus $ turbo_dev --skip-infer build --filter=docs... --output-logs=errors-only --no-daemon • Packages in scope: @repo/eslint-config, @repo/typescript-config, @repo/ui, docs, foo • Running build in 5 packages • Remote caching disabled Tasks: 2 successful, 2 total Cached: 2 cached, 2 total Time: 149ms >>> FULL TURBO [0 olszewski@chriss-mbp] /tmp/dingus $ turbo_dev --skip-infer build --filter=...foo --output-logs=errors-only --no-daemon • Packages in scope: @repo/ui, docs, foo, web • Running build in 4 packages • Remote caching disabled Tasks: 3 successful, 3 total Cached: 2 cached, 3 total Time: 9.829s ``` Closes TURBO-2749
- Loading branch information