From 10a8e46f78cb3d99cbe1e2cbc9184e9d6ecfc0c7 Mon Sep 17 00:00:00 2001 From: Miles Johnson Date: Wed, 4 Oct 2023 15:42:36 -0700 Subject: [PATCH] Add run task. --- .../action-graph/src/action_graph_builder.rs | 32 +- nextgen/action-graph/src/action_node.rs | 2 +- .../action-graph/tests/action_graph_test.rs | 368 +++++++++++++++--- ...t__action_graph__install_deps__graphs.snap | 12 + ..._if_not_affected_by_touched_files.snap.new | 8 + ..._test__action_graph__run_task__graphs.snap | 17 + ...can_have_a_diff_platform_from_project.snap | 17 + ..._graph__sync_project__graphs_multiple.snap | 14 +- ...on_graph__sync_project__graphs_single.snap | 4 +- ..._sync_project__graphs_single_with_dep.snap | 10 +- ..._sync_project__inherits_platform_tool.snap | 10 +- ...c_project__supports_platform_override.snap | 10 +- 12 files changed, 402 insertions(+), 102 deletions(-) create mode 100644 nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__install_deps__graphs.snap create mode 100644 nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__run_task__doesnt_graph_if_not_affected_by_touched_files.snap.new create mode 100644 nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__run_task__graphs.snap create mode 100644 nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__run_task__task_can_have_a_diff_platform_from_project.snap diff --git a/nextgen/action-graph/src/action_graph_builder.rs b/nextgen/action-graph/src/action_graph_builder.rs index 3070875e7cb..914c3a8b3ba 100644 --- a/nextgen/action-graph/src/action_graph_builder.rs +++ b/nextgen/action-graph/src/action_graph_builder.rs @@ -49,7 +49,7 @@ impl<'app> ActionGraphBuilder<'app> { } pub fn get_runtime( - &mut self, + &self, project: &Project, task: Option<&Task>, allow_override: bool, @@ -78,8 +78,8 @@ impl<'app> ActionGraphBuilder<'app> { pub fn install_deps( &mut self, - runtime: &Runtime, project: &Project, + task: Option<&Task>, ) -> miette::Result { let mut in_project = false; @@ -90,7 +90,7 @@ impl<'app> ActionGraphBuilder<'app> { in_project = true; debug!( - "Project {} not within dependency manager workspace, dependencies will be installed within the project instead of the root", + "Project {} is not within the dependency manager workspace, dependencies will be installed within the project instead of the root", color::id(&project.id), ); } @@ -99,11 +99,11 @@ impl<'app> ActionGraphBuilder<'app> { let node = if in_project { ActionNode::InstallProjectDeps { project: project.id.to_owned(), - runtime: runtime.to_owned(), + runtime: self.get_runtime(project, task, true), } } else { ActionNode::InstallDeps { - runtime: self.get_runtime(project, None, false), + runtime: self.get_runtime(project, task, false), } }; @@ -115,7 +115,7 @@ impl<'app> ActionGraphBuilder<'app> { let setup_tool_index = self.setup_tool(node.get_runtime()); let index = self.insert_node(node); - self.graph.add_edge(index, setup_tool_index, ()); + self.link_requirements(index, vec![setup_tool_index]); Ok(index) } @@ -150,12 +150,10 @@ impl<'app> ActionGraphBuilder<'app> { } // We should install deps & sync projects *before* running targets - let install_deps_index = self.install_deps(node.get_runtime(), project)?; + let install_deps_index = self.install_deps(project, Some(task))?; let sync_project_index = self.sync_project(project)?; let index = self.insert_node(node); - - self.graph.add_edge(index, install_deps_index, ()); - self.graph.add_edge(index, sync_project_index, ()); + let mut reqs = vec![install_deps_index, sync_project_index]; // And we also need to create edges for task dependencies if !task.deps.is_empty() { @@ -167,11 +165,11 @@ impl<'app> ActionGraphBuilder<'app> { // We don't pass touched files to dependencies, because if the parent // task is affected/going to run, then so should all of these! - for dep_index in self.run_task_dependencies(task, None)? { - self.graph.add_edge(index, dep_index, ()); - } + reqs.extend(self.run_task_dependencies(task, None)?); } + self.link_requirements(index, reqs); + Ok(Some(index)) } @@ -194,7 +192,7 @@ impl<'app> ActionGraphBuilder<'app> { // When serial, next child depends on previous child } else if let Some(prev) = previous_target_index { - self.graph.add_edge(dep_index, prev, ()); + self.link_requirements(dep_index, vec![prev]); } previous_target_index = Some(dep_index); @@ -303,7 +301,7 @@ impl<'app> ActionGraphBuilder<'app> { let sync_workspace_index = self.sync_workspace(); let index = self.insert_node(node); - self.graph.add_edge(index, sync_workspace_index, ()); + self.link_requirements(index, vec![sync_workspace_index]); index } @@ -319,9 +317,9 @@ impl<'app> ActionGraphBuilder<'app> { } // Syncing requires the language's tool to be installed - let setup_tool_index = self.setup_tool(node.get_runtime()); + let sync_workspace_index = self.sync_workspace(); let index = self.insert_node(node); - let mut reqs = vec![setup_tool_index]; + let mut reqs = vec![sync_workspace_index]; // And we should also depend on other projects for dep_project_id in self.project_graph.dependencies_of(project)? { diff --git a/nextgen/action-graph/src/action_node.rs b/nextgen/action-graph/src/action_node.rs index a27a44631a1..a691c58de60 100644 --- a/nextgen/action-graph/src/action_node.rs +++ b/nextgen/action-graph/src/action_node.rs @@ -86,7 +86,7 @@ impl ActionNode { } Self::SetupTool { runtime } => { if runtime.platform.is_system() { - format!("SetupSystemTool") + "SetupSystemTool".into() } else { format!("Setup{runtime}Tool({})", runtime.requirement) } diff --git a/nextgen/action-graph/tests/action_graph_test.rs b/nextgen/action-graph/tests/action_graph_test.rs index b296a7a696f..ac0fd272e65 100644 --- a/nextgen/action-graph/tests/action_graph_test.rs +++ b/nextgen/action-graph/tests/action_graph_test.rs @@ -1,4 +1,7 @@ +#![allow(clippy::disallowed_names)] + use moon_action_graph::*; +use moon_common::path::WorkspaceRelativePathBuf; use moon_common::Id; use moon_config::{ DependencyConfig, DependencyScope, DependencySource, LanguageType, NodeConfig, @@ -10,16 +13,26 @@ use moon_platform_runtime::*; use moon_project::Project; use moon_project_graph::{GraphType as ProjectGraphType, ProjectGraph, ProjectNode}; use moon_rust_platform::RustPlatform; +use moon_task::{Target, Task}; use proto_core::ProtoEnvironment; -use rustc_hash::FxHashMap; +use rustc_hash::{FxHashMap, FxHashSet}; use starbase_sandbox::assert_snapshot; use std::path::PathBuf; use std::sync::Arc; +fn create_task(id: &str, project: &str) -> Task { + Task { + id: Id::raw(id), + target: Target::new(project, id).unwrap(), + ..Task::default() + } +} + fn create_project(id: &str) -> Project { - let mut project = Project::default(); - project.id = Id::raw(id); - project + Project { + id: Id::raw(id), + ..Project::default() + } } fn create_project_graph() -> ProjectGraph { @@ -99,6 +112,20 @@ fn create_project_graph() -> ProjectGraph { ProjectGraph::new(graph, nodes, &PathBuf::from(".")) } +fn create_node_runtime() -> Runtime { + Runtime::new( + PlatformType::Node, + RuntimeReq::with_version(Version::new(20, 0, 0)), + ) +} + +fn create_rust_runtime() -> Runtime { + Runtime::new( + PlatformType::Rust, + RuntimeReq::with_version(Version::new(1, 70, 0)), + ) +} + fn create_platform_manager() -> PlatformManager { let mut manager = PlatformManager::default(); let root = PathBuf::from("."); @@ -121,7 +148,7 @@ fn create_platform_manager() -> PlatformManager { PlatformType::Rust, Box::new(RustPlatform::new( &RustConfig { - version: Some(UnresolvedVersionSpec::Version(Version::new(1, 72, 0))), + version: Some(UnresolvedVersionSpec::Version(Version::new(1, 70, 0))), ..Default::default() }, &root, @@ -147,6 +174,286 @@ fn topo(mut graph: ActionGraph) -> Vec { mod action_graph { use super::*; + mod install_deps { + use super::*; + + #[test] + fn graphs() { + let pm = create_platform_manager(); + let pg = create_project_graph(); + let mut builder = ActionGraphBuilder::with_platforms(&pm, &pg).unwrap(); + + let bar = pg.get("bar").unwrap(); + builder.install_deps(&bar, None).unwrap(); + + let graph = builder.build().unwrap(); + + assert_snapshot!(graph.to_dot()); + assert_eq!( + topo(graph), + vec![ + ActionNode::SyncWorkspace, + ActionNode::SetupTool { + runtime: create_node_runtime() + }, + ActionNode::InstallDeps { + runtime: create_node_runtime() + } + ] + ); + } + + #[test] + fn ignores_dupes() { + let pm = create_platform_manager(); + let pg = create_project_graph(); + let mut builder = ActionGraphBuilder::with_platforms(&pm, &pg).unwrap(); + + let bar = pg.get("bar").unwrap(); + builder.install_deps(&bar, None).unwrap(); + builder.install_deps(&bar, None).unwrap(); + builder.install_deps(&bar, None).unwrap(); + + let graph = builder.build().unwrap(); + + assert_eq!( + topo(graph), + vec![ + ActionNode::SyncWorkspace, + ActionNode::SetupTool { + runtime: create_node_runtime() + }, + ActionNode::InstallDeps { + runtime: create_node_runtime() + } + ] + ); + } + } + + mod run_task { + use super::*; + use starbase_sandbox::pretty_assertions::assert_eq; + + #[test] + fn graphs() { + let pm = create_platform_manager(); + let pg = create_project_graph(); + let mut builder = ActionGraphBuilder::with_platforms(&pm, &pg).unwrap(); + + let project = pg.get("bar").unwrap(); + + let mut task = create_task("build", "bar"); + task.platform = PlatformType::Node; + + builder.run_task(&project, &task, None).unwrap(); + + let graph = builder.build().unwrap(); + + assert_snapshot!(graph.to_dot()); + assert_eq!( + topo(graph), + vec![ + ActionNode::SyncWorkspace, + ActionNode::SyncProject { + project: Id::raw("bar"), + runtime: create_node_runtime() + }, + ActionNode::SetupTool { + runtime: create_node_runtime() + }, + ActionNode::InstallDeps { + runtime: create_node_runtime() + }, + ActionNode::RunTask { + interactive: false, + persistent: false, + runtime: create_node_runtime(), + target: task.target + } + ] + ); + } + + #[test] + fn ignores_dupes() { + let pm = create_platform_manager(); + let pg = create_project_graph(); + let mut builder = ActionGraphBuilder::with_platforms(&pm, &pg).unwrap(); + + let project = pg.get("bar").unwrap(); + + let mut task = create_task("build", "bar"); + task.platform = PlatformType::Node; + + builder.run_task(&project, &task, None).unwrap(); + builder.run_task(&project, &task, None).unwrap(); + builder.run_task(&project, &task, None).unwrap(); + + let graph = builder.build().unwrap(); + + assert_eq!( + topo(graph), + vec![ + ActionNode::SyncWorkspace, + ActionNode::SyncProject { + project: Id::raw("bar"), + runtime: create_node_runtime() + }, + ActionNode::SetupTool { + runtime: create_node_runtime() + }, + ActionNode::InstallDeps { + runtime: create_node_runtime() + }, + ActionNode::RunTask { + interactive: false, + persistent: false, + runtime: create_node_runtime(), + target: task.target + } + ] + ); + } + + #[test] + fn doesnt_graph_if_not_affected_by_touched_files() { + let pm = create_platform_manager(); + let pg = create_project_graph(); + let mut builder = ActionGraphBuilder::with_platforms(&pm, &pg).unwrap(); + + let project = pg.get("bar").unwrap(); + + let mut task = create_task("build", "bar"); + task.platform = PlatformType::Node; + + builder + // Empty set works fine, just needs to be some + .run_task(&project, &task, Some(&FxHashSet::default())) + .unwrap(); + + let graph = builder.build().unwrap(); + + assert!(topo(graph).is_empty()); + } + + #[test] + fn graphs_if_affected_by_touched_files() { + let pm = create_platform_manager(); + let pg = create_project_graph(); + let mut builder = ActionGraphBuilder::with_platforms(&pm, &pg).unwrap(); + + let file = WorkspaceRelativePathBuf::from("bar/file.js"); + + let project = pg.get("bar").unwrap(); + + let mut task = create_task("build", "bar"); + task.platform = PlatformType::Node; + task.input_files.insert(file.clone()); + + builder + .run_task(&project, &task, Some(&FxHashSet::from_iter([file]))) + .unwrap(); + + let graph = builder.build().unwrap(); + + assert!(!topo(graph).is_empty()); + } + + #[test] + fn task_can_have_a_diff_platform_from_project() { + let pm = create_platform_manager(); + let pg = create_project_graph(); + let mut builder = ActionGraphBuilder::with_platforms(&pm, &pg).unwrap(); + + // node + let project = pg.get("bar").unwrap(); + + let mut task = create_task("build", "bar"); + task.platform = PlatformType::Rust; + + builder.run_task(&project, &task, None).unwrap(); + + let graph = builder.build().unwrap(); + + assert_snapshot!(graph.to_dot()); + assert_eq!( + topo(graph), + vec![ + ActionNode::SyncWorkspace, + ActionNode::SyncProject { + project: Id::raw("bar"), + runtime: create_node_runtime() + }, + ActionNode::SetupTool { + runtime: create_rust_runtime() + }, + ActionNode::InstallDeps { + runtime: create_rust_runtime() + }, + ActionNode::RunTask { + interactive: false, + persistent: false, + runtime: create_rust_runtime(), + target: task.target + } + ] + ); + } + + #[test] + fn sets_interactive() { + let pm = create_platform_manager(); + let pg = create_project_graph(); + let mut builder = ActionGraphBuilder::with_platforms(&pm, &pg).unwrap(); + + let project = pg.get("bar").unwrap(); + + let mut task = create_task("build", "bar"); + task.options.interactive = true; + + builder.run_task(&project, &task, None).unwrap(); + + let graph = builder.build().unwrap(); + + assert_eq!( + topo(graph).last().unwrap(), + &ActionNode::RunTask { + interactive: true, + persistent: false, + runtime: Runtime::system(), + target: task.target + } + ); + } + + #[test] + fn sets_persistent() { + let pm = create_platform_manager(); + let pg = create_project_graph(); + let mut builder = ActionGraphBuilder::with_platforms(&pm, &pg).unwrap(); + + let project = pg.get("bar").unwrap(); + + let mut task = create_task("build", "bar"); + task.options.persistent = true; + + builder.run_task(&project, &task, None).unwrap(); + + let graph = builder.build().unwrap(); + + assert_eq!( + topo(graph).last().unwrap(), + &ActionNode::RunTask { + interactive: false, + persistent: true, + runtime: Runtime::system(), + target: task.target + } + ); + } + } + mod setup_tool { use super::*; @@ -248,9 +555,6 @@ mod action_graph { topo(graph), vec![ ActionNode::SyncWorkspace, - ActionNode::SetupTool { - runtime: Runtime::system() - }, ActionNode::SyncProject { project: Id::raw("bar"), runtime: Runtime::system() @@ -274,9 +578,6 @@ mod action_graph { topo(graph), vec![ ActionNode::SyncWorkspace, - ActionNode::SetupTool { - runtime: Runtime::system() - }, ActionNode::SyncProject { project: Id::raw("bar"), runtime: Runtime::system() @@ -310,9 +611,6 @@ mod action_graph { topo(graph), vec![ ActionNode::SyncWorkspace, - ActionNode::SetupTool { - runtime: Runtime::system() - }, ActionNode::SyncProject { project: Id::raw("qux"), runtime: Runtime::system() @@ -346,9 +644,6 @@ mod action_graph { topo(graph), vec![ ActionNode::SyncWorkspace, - ActionNode::SetupTool { - runtime: Runtime::system() - }, ActionNode::SyncProject { project: Id::raw("bar"), runtime: Runtime::system() @@ -380,31 +675,13 @@ mod action_graph { topo(graph), vec![ ActionNode::SyncWorkspace, - ActionNode::SetupTool { - runtime: Runtime::new( - PlatformType::Rust, - RuntimeReq::with_version(Version::new(1, 72, 0)) - ) - }, - ActionNode::SetupTool { - runtime: Runtime::new( - PlatformType::Node, - RuntimeReq::with_version(Version::new(20, 0, 0)) - ) - }, ActionNode::SyncProject { project: Id::raw("qux"), - runtime: Runtime::new( - PlatformType::Rust, - RuntimeReq::with_version(Version::new(1, 72, 0)) - ) + runtime: create_rust_runtime() }, ActionNode::SyncProject { project: Id::raw("bar"), - runtime: Runtime::new( - PlatformType::Node, - RuntimeReq::with_version(Version::new(20, 0, 0)) - ) + runtime: create_node_runtime() } ] ); @@ -429,18 +706,6 @@ mod action_graph { topo(graph), vec![ ActionNode::SyncWorkspace, - ActionNode::SetupTool { - runtime: Runtime::new_override( - PlatformType::Node, - RuntimeReq::with_version(Version::new(18, 0, 0)) - ) - }, - ActionNode::SetupTool { - runtime: Runtime::new( - PlatformType::Node, - RuntimeReq::with_version(Version::new(20, 0, 0)) - ) - }, ActionNode::SyncProject { project: Id::raw("baz"), runtime: Runtime::new_override( @@ -450,10 +715,7 @@ mod action_graph { }, ActionNode::SyncProject { project: Id::raw("bar"), - runtime: Runtime::new( - PlatformType::Node, - RuntimeReq::with_version(Version::new(20, 0, 0)) - ) + runtime: create_node_runtime() }, ] ); diff --git a/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__install_deps__graphs.snap b/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__install_deps__graphs.snap new file mode 100644 index 00000000000..10d4bd747e0 --- /dev/null +++ b/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__install_deps__graphs.snap @@ -0,0 +1,12 @@ +--- +source: nextgen/action-graph/tests/action_graph_test.rs +expression: graph.to_dot() +--- +digraph { + 0 [ label="SyncWorkspace" ] + 1 [ label="SetupNodeTool(20.0.0)" ] + 2 [ label="InstallNodeDeps(20.0.0)" ] + 1 -> 0 [ ] + 2 -> 1 [ ] +} + diff --git a/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__run_task__doesnt_graph_if_not_affected_by_touched_files.snap.new b/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__run_task__doesnt_graph_if_not_affected_by_touched_files.snap.new new file mode 100644 index 00000000000..c6fb3902fe1 --- /dev/null +++ b/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__run_task__doesnt_graph_if_not_affected_by_touched_files.snap.new @@ -0,0 +1,8 @@ +--- +source: nextgen/action-graph/tests/action_graph_test.rs +assertion_line: 296 +expression: graph.to_dot() +--- +digraph { +} + diff --git a/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__run_task__graphs.snap b/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__run_task__graphs.snap new file mode 100644 index 00000000000..bbb08d9a762 --- /dev/null +++ b/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__run_task__graphs.snap @@ -0,0 +1,17 @@ +--- +source: nextgen/action-graph/tests/action_graph_test.rs +expression: graph.to_dot() +--- +digraph { + 0 [ label="SyncWorkspace" ] + 1 [ label="SetupNodeTool(20.0.0)" ] + 2 [ label="InstallNodeDeps(20.0.0)" ] + 3 [ label="SyncNodeProject(bar)" ] + 4 [ label="RunTask(bar:build)" ] + 1 -> 0 [ ] + 2 -> 1 [ ] + 3 -> 0 [ ] + 4 -> 2 [ ] + 4 -> 3 [ ] +} + diff --git a/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__run_task__task_can_have_a_diff_platform_from_project.snap b/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__run_task__task_can_have_a_diff_platform_from_project.snap new file mode 100644 index 00000000000..ed6cd4af7c9 --- /dev/null +++ b/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__run_task__task_can_have_a_diff_platform_from_project.snap @@ -0,0 +1,17 @@ +--- +source: nextgen/action-graph/tests/action_graph_test.rs +expression: graph.to_dot() +--- +digraph { + 0 [ label="SyncWorkspace" ] + 1 [ label="SetupRustTool(1.70.0)" ] + 2 [ label="InstallRustDeps(1.70.0)" ] + 3 [ label="SyncNodeProject(bar)" ] + 4 [ label="RunTask(bar:build)" ] + 1 -> 0 [ ] + 2 -> 1 [ ] + 3 -> 0 [ ] + 4 -> 2 [ ] + 4 -> 3 [ ] +} + diff --git a/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__sync_project__graphs_multiple.snap b/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__sync_project__graphs_multiple.snap index 6f9dda954a9..bb151659335 100644 --- a/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__sync_project__graphs_multiple.snap +++ b/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__sync_project__graphs_multiple.snap @@ -4,14 +4,12 @@ expression: graph.to_dot() --- digraph { 0 [ label="SyncWorkspace" ] - 1 [ label="SetupSystemTool" ] - 2 [ label="SyncSystemProject(foo)" ] - 3 [ label="SyncSystemProject(bar)" ] - 4 [ label="SyncSystemProject(qux)" ] + 1 [ label="SyncSystemProject(foo)" ] + 2 [ label="SyncSystemProject(bar)" ] + 3 [ label="SyncSystemProject(qux)" ] + 2 -> 0 [ ] 1 -> 0 [ ] - 3 -> 1 [ ] - 2 -> 1 [ ] - 2 -> 3 [ ] - 4 -> 1 [ ] + 1 -> 2 [ ] + 3 -> 0 [ ] } diff --git a/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__sync_project__graphs_single.snap b/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__sync_project__graphs_single.snap index ddfdb147fe1..2afc70a17f2 100644 --- a/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__sync_project__graphs_single.snap +++ b/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__sync_project__graphs_single.snap @@ -4,9 +4,7 @@ expression: graph.to_dot() --- digraph { 0 [ label="SyncWorkspace" ] - 1 [ label="SetupSystemTool" ] - 2 [ label="SyncSystemProject(bar)" ] + 1 [ label="SyncSystemProject(bar)" ] 1 -> 0 [ ] - 2 -> 1 [ ] } diff --git a/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__sync_project__graphs_single_with_dep.snap b/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__sync_project__graphs_single_with_dep.snap index 46d410389a3..4600b32bf02 100644 --- a/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__sync_project__graphs_single_with_dep.snap +++ b/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__sync_project__graphs_single_with_dep.snap @@ -4,12 +4,10 @@ expression: graph.to_dot() --- digraph { 0 [ label="SyncWorkspace" ] - 1 [ label="SetupSystemTool" ] - 2 [ label="SyncSystemProject(foo)" ] - 3 [ label="SyncSystemProject(bar)" ] + 1 [ label="SyncSystemProject(foo)" ] + 2 [ label="SyncSystemProject(bar)" ] + 2 -> 0 [ ] 1 -> 0 [ ] - 3 -> 1 [ ] - 2 -> 1 [ ] - 2 -> 3 [ ] + 1 -> 2 [ ] } diff --git a/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__sync_project__inherits_platform_tool.snap b/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__sync_project__inherits_platform_tool.snap index c59a9643d06..f01b2d0d799 100644 --- a/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__sync_project__inherits_platform_tool.snap +++ b/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__sync_project__inherits_platform_tool.snap @@ -4,13 +4,9 @@ expression: graph.to_dot() --- digraph { 0 [ label="SyncWorkspace" ] - 1 [ label="SetupNodeTool(20.0.0)" ] - 2 [ label="SyncNodeProject(bar)" ] - 3 [ label="SetupRustTool(1.72.0)" ] - 4 [ label="SyncRustProject(qux)" ] + 1 [ label="SyncNodeProject(bar)" ] + 2 [ label="SyncRustProject(qux)" ] 1 -> 0 [ ] - 2 -> 1 [ ] - 3 -> 0 [ ] - 4 -> 3 [ ] + 2 -> 0 [ ] } diff --git a/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__sync_project__supports_platform_override.snap b/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__sync_project__supports_platform_override.snap index 8f0bbd2e090..197a66ca35b 100644 --- a/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__sync_project__supports_platform_override.snap +++ b/nextgen/action-graph/tests/snapshots/action_graph_test__action_graph__sync_project__supports_platform_override.snap @@ -4,13 +4,9 @@ expression: graph.to_dot() --- digraph { 0 [ label="SyncWorkspace" ] - 1 [ label="SetupNodeTool(20.0.0)" ] - 2 [ label="SyncNodeProject(bar)" ] - 3 [ label="SetupNodeTool(18.0.0)" ] - 4 [ label="SyncNodeProject(baz)" ] + 1 [ label="SyncNodeProject(bar)" ] + 2 [ label="SyncNodeProject(baz)" ] 1 -> 0 [ ] - 2 -> 1 [ ] - 3 -> 0 [ ] - 4 -> 3 [ ] + 2 -> 0 [ ] }