From 75c95dc40fd7d797b8e7dd50176a631aa4e3e88f Mon Sep 17 00:00:00 2001 From: Mehul Kar Date: Thu, 8 Jun 2023 11:36:22 -0500 Subject: [PATCH 1/2] docs: document that multiple --filters are unions --- .../repo/docs/reference/command-line-reference/run.mdx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/pages/repo/docs/reference/command-line-reference/run.mdx b/docs/pages/repo/docs/reference/command-line-reference/run.mdx index 5c49cc2dd3148..50f02cbda7d9b 100644 --- a/docs/pages/repo/docs/reference/command-line-reference/run.mdx +++ b/docs/pages/repo/docs/reference/command-line-reference/run.mdx @@ -131,9 +131,11 @@ for execution. Multiple filters can be combined to select distinct sets of targets. Additionally, filters can also exclude targets. A target that matches any filter and is not explicitly excluded will -be in the final entrypoint selection. +be in the final entrypoint selection. In other words, the final list of targets is an _union_ +of all the targets matching the filters provided, not an intersection. -For more detailed information about the `--filter` flag and filtering, refer to the [dedicated page in our documentation](/repo/docs/core-concepts/monorepos/filtering). +For more detailed information about the `--filter` flag and filtering, refer to +the [dedicated page in our documentation][3]. ```sh turbo run build --filter=my-pkg @@ -488,3 +490,4 @@ turbo run build --since=origin/main [1]: /repo/docs/reference/configuration#passThroughEnv [2]: /repo/docs/reference/configuration#globalPassThroughEnv +[3]: /repo/docs/core-concepts/monorepos/filtering From a7cf8c9baf535eff4407fac9f5953cc7e8efaf9e Mon Sep 17 00:00:00 2001 From: Mehul Kar Date: Thu, 8 Jun 2023 11:46:32 -0500 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Greg Soltis --- docs/pages/repo/docs/reference/command-line-reference/run.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/pages/repo/docs/reference/command-line-reference/run.mdx b/docs/pages/repo/docs/reference/command-line-reference/run.mdx index 50f02cbda7d9b..b6e2391f308e0 100644 --- a/docs/pages/repo/docs/reference/command-line-reference/run.mdx +++ b/docs/pages/repo/docs/reference/command-line-reference/run.mdx @@ -131,8 +131,8 @@ for execution. Multiple filters can be combined to select distinct sets of targets. Additionally, filters can also exclude targets. A target that matches any filter and is not explicitly excluded will -be in the final entrypoint selection. In other words, the final list of targets is an _union_ -of all the targets matching the filters provided, not an intersection. +be in the final entrypoint selection. In other words, the final list of targets is a _union_ +of all the targets matching the filters provided, minus the union of targets that have been excluded. For more detailed information about the `--filter` flag and filtering, refer to the [dedicated page in our documentation][3].