pub fn compute_depth(
node: &str,
importers_by_file: &HashMap<String, HashSet<String>>,
memo: &mut HashMap<String, usize>,
in_stack: &mut HashSet<String>,
) -> usizeExpand description
Compute depth for a single node via DFS + memoization. depth(M) = max(1 + depth(importer) for importer in importers_by_file[M]), base 0.