Skip to content

Commit

Permalink
While building the dependency graph, also follow aliases.
Browse files Browse the repository at this point in the history
Aliases might lead us to a different package that we don't know
about yet.
  • Loading branch information
hzeller committed Jul 3, 2024
1 parent 2650675 commit 2cd74ea
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion bant/explore/dependency-graph.cc
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,14 @@ DependencyGraph BuildDependencyGraph(Session &session,
// The list to insert all the dependencies our current target has.
std::vector<BazelTarget> &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;

Expand Down

0 comments on commit 2cd74ea

Please sign in to comment.