From 1ab911ad26483af5cdc4f60a1cf7350ceb0c48fd Mon Sep 17 00:00:00 2001 From: Guice Team Date: Thu, 26 Oct 2023 08:47:06 -0700 Subject: [PATCH] Internal change PiperOrigin-RevId: 576885259 --- mvn.bzl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mvn.bzl b/mvn.bzl index 02036099bd..1777b294f7 100644 --- a/mvn.bzl +++ b/mvn.bzl @@ -55,7 +55,9 @@ def _validate_target_libs_rule_impl(ctx): "\n\t expected = [" + expected_formatted + "]" + "\n\t actual = [" + actual_formatted + "]") -_validate_target_libs_rule = rule( +# This rule exists to perform an assertion during the Starlark analysis phase, causing any macro or +# BUILD file instantiating it to fail to generate. +_validate_target_libs_binary = rule( implementation = _validate_target_libs_rule_impl, attrs = { "target": attr.label(aspects = [_collect_exports_aspect]), @@ -93,10 +95,9 @@ def gen_maven_artifact( javadoc_srcs: Source files used to generate the Javadoc maven artifact. packaging: The packaging used for the artifact, default is "jar". is_extension: Whether the maven artifact is a Guice extension or not. - """ - _validate_target_libs_rule( + _validate_target_libs_binary( name = name + "_validate_target_libs", target = artifact_target, actual_target_libs = artifact_target_libs,