diff --git a/crates/turborepo-lib/src/run/summary/mod.rs b/crates/turborepo-lib/src/run/summary/mod.rs index c9b58aeda5820..261f85be22b34 100644 --- a/crates/turborepo-lib/src/run/summary/mod.rs +++ b/crates/turborepo-lib/src/run/summary/mod.rs @@ -569,6 +569,10 @@ impl<'a> RunSummary<'a> { }; cwriteln!(tab_writer, ui, GREY, " Dependents\t=\t{}", dependents)?; + + let with = task.shared.with.iter().join(", "); + cwriteln!(tab_writer, ui, GREY, " With\t=\t{}", with)?; + cwriteln!( tab_writer, ui, diff --git a/crates/turborepo-lib/src/run/summary/task.rs b/crates/turborepo-lib/src/run/summary/task.rs index ef2c2cced2633..e68ea05bd772f 100644 --- a/crates/turborepo-lib/src/run/summary/task.rs +++ b/crates/turborepo-lib/src/run/summary/task.rs @@ -77,6 +77,7 @@ pub(crate) struct SharedTaskSummary { pub directory: Option, pub dependencies: Vec, pub dependents: Vec, + pub with: Vec, pub resolved_task_definition: TaskSummaryTaskDefinition, pub expanded_outputs: Vec, pub framework: String, @@ -235,6 +236,7 @@ impl From>> for SharedTaskSummary { execution, env_mode, environment_variables, + with, .. } = value; Self { @@ -257,6 +259,7 @@ impl From>> for SharedTaskSummary { .into_iter() .map(|task_id| task_id.task().to_string()) .collect(), + with, resolved_task_definition, framework, execution, diff --git a/crates/turborepo-lib/src/run/summary/task_factory.rs b/crates/turborepo-lib/src/run/summary/task_factory.rs index 6efcc794045f5..fcd237538ed33 100644 --- a/crates/turborepo-lib/src/run/summary/task_factory.rs +++ b/crates/turborepo-lib/src/run/summary/task_factory.rs @@ -156,6 +156,16 @@ impl<'a> TaskSummaryFactory<'a> { path.join(&relative_log_file).to_string() }); + let with = task_definition + .with + .as_ref() + .map(|with| { + with.iter() + .map(|task| task.as_inner().to_string()) + .collect() + }) + .unwrap_or_default(); + Ok(SharedTaskSummary { hash, inputs: expanded_inputs.into_iter().collect(), @@ -180,6 +190,7 @@ impl<'a> TaskSummaryFactory<'a> { framework, dependencies, dependents, + with, env_mode: self.global_env_mode, environment_variables: TaskEnvVarSummary::new( task_definition, diff --git a/turborepo-tests/integration/tests/dry-json/monorepo.t b/turborepo-tests/integration/tests/dry-json/monorepo.t index cd1646ea5ae95..667533cdf5952 100644 --- a/turborepo-tests/integration/tests/dry-json/monorepo.t +++ b/turborepo-tests/integration/tests/dry-json/monorepo.t @@ -74,6 +74,7 @@ Setup "directory": "apps(\/|\\\\)my-app", (re) "dependencies": [], "dependents": [], + "with": [], "resolvedTaskDefinition": { "outputs": [ "apple.json", @@ -131,6 +132,7 @@ Setup "directory": "packages(\/|\\\\)util", (re) "dependencies": [], "dependents": [], + "with": [], "resolvedTaskDefinition": { "outputs": [], "cache": true, diff --git a/turborepo-tests/integration/tests/dry-json/single-package-no-config.t b/turborepo-tests/integration/tests/dry-json/single-package-no-config.t index 93e5af13452cd..37247a191650b 100644 --- a/turborepo-tests/integration/tests/dry-json/single-package-no-config.t +++ b/turborepo-tests/integration/tests/dry-json/single-package-no-config.t @@ -54,6 +54,7 @@ Setup "excludedOutputs": null, "dependencies": [], "dependents": [], + "with": [], "resolvedTaskDefinition": { "outputs": [], "cache": false, diff --git a/turborepo-tests/integration/tests/dry-json/single-package-with-deps.t b/turborepo-tests/integration/tests/dry-json/single-package-with-deps.t index d40c49e3ce186..6926696c382a7 100644 --- a/turborepo-tests/integration/tests/dry-json/single-package-with-deps.t +++ b/turborepo-tests/integration/tests/dry-json/single-package-with-deps.t @@ -59,6 +59,7 @@ Setup "dependents": [ "test" ], + "with": [], "resolvedTaskDefinition": { "outputs": [ "foo.txt" @@ -113,6 +114,7 @@ Setup "build" ], "dependents": [], + "with": [], "resolvedTaskDefinition": { "outputs": [], "cache": true, diff --git a/turborepo-tests/integration/tests/dry-json/single-package.t b/turborepo-tests/integration/tests/dry-json/single-package.t index 379e55158d9a1..9344cc59ef155 100644 --- a/turborepo-tests/integration/tests/dry-json/single-package.t +++ b/turborepo-tests/integration/tests/dry-json/single-package.t @@ -57,6 +57,7 @@ Setup "logFile": ".turbo(\/|\\\\)turbo-build.log", (re) "dependencies": [], "dependents": [], + "with": [], "resolvedTaskDefinition": { "outputs": [ "foo.txt" diff --git a/turborepo-tests/integration/tests/dry-run.t b/turborepo-tests/integration/tests/dry-run.t index bb0363e41b66d..cab66919cd9dd 100644 --- a/turborepo-tests/integration/tests/dry-run.t +++ b/turborepo-tests/integration/tests/dry-run.t @@ -27,7 +27,7 @@ Setup Engines Values = # Part 3 are Tasks to Run, and we have to validate each task separately - $ cat tmp-3.txt | grep "my-app#build" -A 17 + $ cat tmp-3.txt | grep "my-app#build" -A 18 my-app#build Task = build\s* (re) Package = my-app\s* (re) @@ -40,6 +40,7 @@ Setup Log File = apps(\/|\\)my-app(\/|\\)\.turbo(\/|\\)turbo-build\.log\s* (re) Dependencies =\s* (re) Dependents =\s* (re) + With =\s* (re) Inputs Files Considered = 2\s* (re) Env Vars =\s* (re) Env Vars Values =\s* (re) @@ -47,7 +48,7 @@ Setup Passed Through Env Vars =\s* (re) Passed Through Env Vars Values =\s* (re) - $ cat tmp-3.txt | grep "util#build" -A 17 + $ cat tmp-3.txt | grep "util#build" -A 18 util#build Task = build\s* (re) Package = util\s* (re) @@ -60,6 +61,7 @@ Setup Log File = packages(\/|\\)util(\/|\\)\.turbo(\/|\\)turbo-build\.log\s* (re) Dependencies =\s* (re) Dependents =\s* (re) + With =\s* (re) Inputs Files Considered = 1\s* (re) Env Vars = NODE_ENV\s* (re) Env Vars Values =\s* (re) diff --git a/turborepo-tests/integration/tests/run-summary/error.t b/turborepo-tests/integration/tests/run-summary/error.t index dc82fb582f0ef..ce01758c194ab 100644 --- a/turborepo-tests/integration/tests/run-summary/error.t +++ b/turborepo-tests/integration/tests/run-summary/error.t @@ -52,6 +52,7 @@ Validate that we got a full task summary for the failed task with an error in .e "directory": "apps(\/|\\\\)my-app", (re) "dependencies": [], "dependents": [], + "with": [], "resolvedTaskDefinition": { "outputs": [], "cache": true, diff --git a/turborepo-tests/integration/tests/run-summary/single-package.t b/turborepo-tests/integration/tests/run-summary/single-package.t index f3f21463e6191..2dcc44fb0457e 100644 --- a/turborepo-tests/integration/tests/run-summary/single-package.t +++ b/turborepo-tests/integration/tests/run-summary/single-package.t @@ -85,7 +85,8 @@ Check "outputs", "resolvedTaskDefinition", "task", - "taskId" + "taskId", + "with" ] $ echo $TASK_SUMMARY | jq '.execution' diff --git a/turborepo-tests/integration/tests/run/single-package/dry-run.t b/turborepo-tests/integration/tests/run/single-package/dry-run.t index c7b8679951343..f506bd55992ab 100644 --- a/turborepo-tests/integration/tests/run/single-package/dry-run.t +++ b/turborepo-tests/integration/tests/run/single-package/dry-run.t @@ -26,6 +26,7 @@ Check Log File = .turbo(\/|\\)turbo-build.log\s* (re) Dependencies =\s* (re) Dependents =\s* (re) + With =\s* (re) Inputs Files Considered = 5\s* (re) Env Vars = Env Vars Values = diff --git a/turborepo-tests/integration/tests/run/single-package/no-config.t b/turborepo-tests/integration/tests/run/single-package/no-config.t index 32e15d3edb326..46ee2b6b2d847 100644 --- a/turborepo-tests/integration/tests/run/single-package/no-config.t +++ b/turborepo-tests/integration/tests/run/single-package/no-config.t @@ -28,6 +28,7 @@ Check Log File = Dependencies =\s* (re) Dependents =\s* (re) + With =\s* (re) Inputs Files Considered = 4\s* (re) Env Vars = Env Vars Values = diff --git a/turborepo-tests/integration/tests/run/single-package/with-deps-dry-run.t b/turborepo-tests/integration/tests/run/single-package/with-deps-dry-run.t index 9af379949dc79..42d923da50562 100644 --- a/turborepo-tests/integration/tests/run/single-package/with-deps-dry-run.t +++ b/turborepo-tests/integration/tests/run/single-package/with-deps-dry-run.t @@ -26,6 +26,7 @@ Check Log File = .turbo(\/|\\)turbo-build.log\s* (re) Dependencies =\s* (re) Dependents = test\s* (re) + With =\s* (re) Inputs Files Considered = 5\s* (re) Env Vars = Env Vars Values = @@ -44,6 +45,7 @@ Check Log File = .turbo(\/|\\)turbo-test.log\s* (re) Dependencies = build\s* (re) Dependents =\s* (re) + With =\s* (re) Inputs Files Considered = 5\s* (re) Env Vars = Env Vars Values =