Skip to content

Commit

Permalink
Respond to review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed Jan 11, 2021
1 parent 2d246a7 commit 9c82810
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions coursier.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def _add_outdated_files(repository_ctx, artifacts, repositories):
executable = True,
)

def _is_failing_build_if_inputs_change(repository_ctx):
def _fail_if_repin_required(repository_ctx):
if not repository_ctx.attr.fail_if_repin_required:
return False

Expand Down Expand Up @@ -373,9 +373,9 @@ def _pinned_coursier_fetch_impl(repository_ctx):
"This feature ensures that the build does not use stale dependencies when the inputs " +
"have changed. To generate this signature, run 'bazel run @unpinned_%s//:pin'." % repository_ctx.name)
else:
computed = compute_dependency_inputs_signature(repository_ctx.attr.artifacts)
if computed != dep_tree.get("__INPUT_ARTIFACTS_HASH"):
if _is_failing_build_if_inputs_change(repository_ctx):
computed_artifacts_hash = compute_dependency_inputs_signature(repository_ctx.attr.artifacts)
if computed_artifacts_hash != dep_tree.get("__INPUT_ARTIFACTS_HASH"):
if _fail_if_repin_required(repository_ctx):
fail("%s_install.json contains an invalid input signature and must be regenerated. " % (repository_ctx.name) +
"This typically happens when the maven_install artifacts have been changed but not repinned. " +
"PLEASE DO NOT MODIFY THIS FILE DIRECTLY! To generate a new " +
Expand Down

0 comments on commit 9c82810

Please sign in to comment.