Skip to content

Commit

Permalink
feat: ignore routeNmaes symbol to avoid circular dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
wtlin1228 committed Oct 9, 2024
1 parent 739d48e commit 99d2cf5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/dt_tracker/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ impl<'graph> DependencyTracker<'graph> {
}

pub fn trace(&mut self, module_symbol: ModuleSymbol) -> anyhow::Result<Vec<Vec<ModuleSymbol>>> {
// Treat routeNmaes specially since they cause a lot of circular dependencies in
// some of our codebases. One assumption of this tool is "no circular dependency"
// , so let's workaround here for now.
if module_symbol.1.to_string() == "routeNames" {
return Ok(vec![]);
}

// early return if cached
if let Some(cached) = self.cache.get(&module_symbol) {
return Ok(cached.clone());
Expand Down

0 comments on commit 99d2cf5

Please sign in to comment.