Skip to content

Commit

Permalink
fix(common): track targets when determining built dependencies
Browse files Browse the repository at this point in the history
When multiple modules listed the same dependency, but with different
targets, only the first dependency:target would be built, because we
were not tracking the targets as well.
  • Loading branch information
mcdurdin committed May 18, 2024
1 parent 48eaace commit a588674
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions resources/builder.inc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1682,26 +1682,26 @@ _builder_do_build_deps() {
continue
fi

# Only configure and build the dependency once per invocation
if builder_has_module_been_built "$dep"; then
continue
fi

dep_target=
if [[ ! -z ${_builder_dep_targets[$dep]+x} ]]; then
# TODO: in the future split _builder_dep_targets into comma-separated
# array for multiple targets for a dep?
dep_target=${_builder_dep_targets[$dep]}
fi

builder_set_module_has_been_built "$dep"
# Only configure and build the dependency once per invocation
if builder_has_module_been_built "$dep$dep_target"; then
continue
fi

builder_set_module_has_been_built "$dep$dep_target"
"$REPO_ROOT/$dep/build.sh" "configure$dep_target" "build$dep_target" \
$builder_verbose \
$builder_debug \
$_builder_build_deps \
--builder-dep-parent "$THIS_SCRIPT_IDENTIFIER" && (
if $_builder_debug_internal; then
builder_echo success "## Dependency $dep for $_builder_matched_action_name successfully"
builder_echo success "## Dependency $dep$dep_target for $_builder_matched_action_name successfully"
fi
) || (
result=$?
Expand Down

0 comments on commit a588674

Please sign in to comment.