dep-resolv: There's a reason I included a visit-guard before.

Even without include-dependencies, without this visit guard the tree
traversal code will add a ksb::Module dependency (when they are
encountered) to the build list every time it is encountered, not just
the first time it's encountered.
wilder
Michael Pyne 11 years ago
parent b452401f50
commit 96fe204e59
  1. 6
      modules/ksb/DependencyResolver.pm

@ -325,6 +325,12 @@ sub _visitModuleAndDependencies
my $item = _shortenModuleName($module->fullProjectPath());
my $branch = _getBranchOf($module) // '*';
# Since the initial build list is visited start to finish it is
# possible for this module to already be in the ordered list if
# reordering has already happened or if dependencies are included (i.e.
# this was a dependency of some other module).
return if ($optionsRef->{visitedItems}->{$item} // 0) == 3;
$dependentName //= $item if $module->getOption('include-dependencies');
_visitDependencyItemAndDependencies($optionsRef, "$item:$branch", $level, $dependentName);

Loading…
Cancel
Save