diff --git a/bant/explore/dependency-graph.cc b/bant/explore/dependency-graph.cc index 9f94061..0b9eda1 100644 --- a/bant/explore/dependency-graph.cc +++ b/bant/explore/dependency-graph.cc @@ -162,7 +162,14 @@ DependencyGraph BuildDependencyGraph(Session &session, // The list to insert all the dependencies our current target has. std::vector &depends_on = graph.depends_on.insert({*target_or, {}}).first->second; - for (const auto dep : query::ExtractStringList(result.deps_list)) { + + // Follow dependencies and alias references. + auto to_follow = query::ExtractStringList(result.deps_list); + if (!result.actual.empty()) { + to_follow.push_back(result.actual); + } + + for (const auto dep : to_follow) { auto dependency_or = BazelTarget::ParseFrom(dep, current_package); if (!dependency_or.has_value()) continue;