From dbc4aa749f934411b64c22adcd62439e54b57f7a Mon Sep 17 00:00:00 2001 From: Jin Date: Mon, 15 Apr 2019 21:31:23 -0400 Subject: [PATCH] Add a else clause to generate_imports to guide users to open an issue (#109) --- coursier.bzl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/coursier.bzl b/coursier.bzl index e29a2ef86..a4cfcbbec 100644 --- a/coursier.bzl +++ b/coursier.bzl @@ -330,6 +330,18 @@ Parsed artifact data: {parsed_artifact}""".format( ) fail(error_message) + else: + error_message = """Unable to generate a target for this artifact. + +Please file an issue on https://github.com/bazelbuild/rules_jvm_external/issues/new +and include the following snippet: + +Artifact coordinates: {artifact} +Parsed data: {parsed_artifact}""".format( + artifact = artifact["coord"], + parsed_artifact = repr(artifact) + ) + fail(error_message) return "\n".join(all_imports)