Skip to main content

transitive_dependents

Function transitive_dependents 

Source
pub fn transitive_dependents(issues: &[PlanIssue], id: &str) -> Vec<String>
Expand description

Every issue that waits on id, directly or through another, in canonical order.

A breadth-first walk of the plan’s own dependents relation. id itself is never in the answer, even when a cycle leads back to it.

use majordomus_cli::devtask::graph::transitive_dependents;
let issues = vec![node("A", &["B"]), node("B", &["C"]), node("C", &[])];
assert_eq!(transitive_dependents(&issues, "A"), ["B", "C"]);
assert!(transitive_dependents(&issues, "C").is_empty());