Skip to content

Commit

Permalink
Get tests working.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed Jul 26, 2023
1 parent b96e61f commit c80264c
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ digraph {
1 [ label="nodeNameOnly" style=filled, shape=oval, fillcolor=gray, fontcolor=black]
2 [ label="node" style=filled, shape=oval, fillcolor=gray, fontcolor=black]
3 [ label="explicitAndImplicit" style=filled, shape=oval, fillcolor=gray, fontcolor=black]
4 [ label="noLang" style=filled, shape=oval, fillcolor=gray, fontcolor=black]
5 [ label="implicit" style=filled, shape=oval, fillcolor=gray, fontcolor=black]
6 [ label="explicit" style=filled, shape=oval, fillcolor=gray, fontcolor=black]
2 -> 0 [ arrowhead=box, arrowtail=box]
2 -> 1 [ arrowhead=box, arrowtail=box]
3 -> 0 [ arrowhead=box, arrowtail=box]
3 -> 1 [ arrowhead=box, arrowtail=box]
3 -> 2 [ arrowhead=box, arrowtail=box]
5 -> 0 [ arrowhead=box, arrowtail=box]
5 -> 2 [ arrowhead=box, arrowtail=box]
6 -> 0 [ arrowhead=box, arrowtail=box]
6 -> 2 [ arrowhead=box, arrowtail=box]
4 [ label="explicit" style=filled, shape=oval, fillcolor=gray, fontcolor=black]
5 [ label="noLang" style=filled, shape=oval, fillcolor=gray, fontcolor=black]
6 [ label="implicit" style=filled, shape=oval, fillcolor=gray, fontcolor=black]
2 -> 1 [ label="production" arrowhead=box, arrowtail=box]
2 -> 0 [ label="production" arrowhead=box, arrowtail=box]
3 -> 0 [ label="production" arrowhead=box, arrowtail=box]
3 -> 1 [ label="peer" arrowhead=box, arrowtail=box]
3 -> 2 [ label="development" arrowhead=box, arrowtail=box]
4 -> 0 [ label="production" arrowhead=box, arrowtail=box]
4 -> 2 [ label="development" arrowhead=box, arrowtail=box]
6 -> 0 [ label="development" arrowhead=box, arrowtail=box]
6 -> 2 [ label="production" arrowhead=box, arrowtail=box]
}

4 changes: 2 additions & 2 deletions nextgen/project-graph/src/project_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ impl ProjectGraph {
}

fn expand_project(&self, id: &Id) -> miette::Result<Project> {
debug!(id = id.as_str(), "Expanding project {}", color::id(&id));
debug!(id = id.as_str(), "Expanding project {}", color::id(id));

let unexpanded_project = self.get_unexpanded(id)?;
let mut project = unexpanded_project.to_owned();
Expand All @@ -261,7 +261,7 @@ impl ProjectGraph {
for task_id in unexpanded_project.tasks.keys() {
// Resolve in this order!
expander.expand_env(task_id)?;
expander.expand_deps(task_id, &query)?;
expander.expand_deps(task_id, query)?;
expander.expand_inputs(task_id)?;
expander.expand_outputs(task_id)?;
expander.expand_args(task_id)?;
Expand Down
6 changes: 3 additions & 3 deletions nextgen/task-expander/src/tasks_expander.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ impl<'proj> TasksExpander<'proj> {
};

for dep_project in query(input)? {
check_and_push_dep(&dep_project, &dep_target.task_id, true)?;
check_and_push_dep(dep_project, &dep_target.task_id, true)?;
}
}
}
Expand Down Expand Up @@ -245,7 +245,7 @@ impl<'proj> TasksExpander<'proj> {
}

for dep_project in results {
check_and_push_dep(&dep_project, &dep_target.task_id, false)?;
check_and_push_dep(dep_project, &dep_target.task_id, false)?;
}
}
}
Expand All @@ -255,7 +255,7 @@ impl<'proj> TasksExpander<'proj> {
if dep_project.id == project.id {
// Avoid circular references
} else {
check_and_push_dep(&dep_project, &dep_target.task_id, true)?;
check_and_push_dep(dep_project, &dep_target.task_id, true)?;
}
}
}
Expand Down
Loading

0 comments on commit c80264c

Please sign in to comment.