这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions crates/turborepo-lib/src/run/summary/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions crates/turborepo-lib/src/run/summary/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ pub(crate) struct SharedTaskSummary<T> {
pub directory: Option<String>,
pub dependencies: Vec<T>,
pub dependents: Vec<T>,
pub with: Vec<String>,
pub resolved_task_definition: TaskSummaryTaskDefinition,
pub expanded_outputs: Vec<AnchoredSystemPathBuf>,
pub framework: String,
Expand Down Expand Up @@ -235,6 +236,7 @@ impl From<SharedTaskSummary<TaskId<'static>>> for SharedTaskSummary<String> {
execution,
env_mode,
environment_variables,
with,
..
} = value;
Self {
Expand All @@ -257,6 +259,7 @@ impl From<SharedTaskSummary<TaskId<'static>>> for SharedTaskSummary<String> {
.into_iter()
.map(|task_id| task_id.task().to_string())
.collect(),
with,
resolved_task_definition,
framework,
execution,
Expand Down
11 changes: 11 additions & 0 deletions crates/turborepo-lib/src/run/summary/task_factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -180,6 +190,7 @@ impl<'a> TaskSummaryFactory<'a> {
framework,
dependencies,
dependents,
with,
env_mode: self.global_env_mode,
environment_variables: TaskEnvVarSummary::new(
task_definition,
Expand Down
2 changes: 2 additions & 0 deletions turborepo-tests/integration/tests/dry-json/monorepo.t
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ Setup
"directory": "apps(\/|\\\\)my-app", (re)
"dependencies": [],
"dependents": [],
"with": [],
"resolvedTaskDefinition": {
"outputs": [
"apple.json",
Expand Down Expand Up @@ -131,6 +132,7 @@ Setup
"directory": "packages(\/|\\\\)util", (re)
"dependencies": [],
"dependents": [],
"with": [],
"resolvedTaskDefinition": {
"outputs": [],
"cache": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Setup
"excludedOutputs": null,
"dependencies": [],
"dependents": [],
"with": [],
"resolvedTaskDefinition": {
"outputs": [],
"cache": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Setup
"dependents": [
"test"
],
"with": [],
"resolvedTaskDefinition": {
"outputs": [
"foo.txt"
Expand Down Expand Up @@ -113,6 +114,7 @@ Setup
"build"
],
"dependents": [],
"with": [],
"resolvedTaskDefinition": {
"outputs": [],
"cache": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Setup
"logFile": ".turbo(\/|\\\\)turbo-build.log", (re)
"dependencies": [],
"dependents": [],
"with": [],
"resolvedTaskDefinition": {
"outputs": [
"foo.txt"
Expand Down
6 changes: 4 additions & 2 deletions turborepo-tests/integration/tests/dry-run.t
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -40,14 +40,15 @@ 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)
Inferred Env Vars Values =\s* (re)
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)
Expand All @@ -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)
Expand Down
1 change: 1 addition & 0 deletions turborepo-tests/integration/tests/run-summary/error.t
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ Check
"outputs",
"resolvedTaskDefinition",
"task",
"taskId"
"taskId",
"with"
]

$ echo $TASK_SUMMARY | jq '.execution'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -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 =
Expand Down
Loading