JavaBuilder: for jars that are produced by aspects (e.g., JavaProtoAspect), pass the name of the injecting rule (e.g., java_proto_library), if the rule registered it.
Registration is done using AspectParameters and a specially-named key.
--
MOS_MIGRATED_REVID=128179548
diff --git a/src/main/java/com/google/devtools/build/lib/packages/Aspect.java b/src/main/java/com/google/devtools/build/lib/packages/Aspect.java
index 93f3f4c..8e0be0c 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/Aspect.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/Aspect.java
@@ -26,6 +26,10 @@
*/
@Immutable
public final class Aspect implements DependencyFilter.AttributeInfoProvider {
+
+ /** */
+ public static final String INJECTING_RULE_KIND_PARAMETER_KEY = "$injecting_rule_kind";
+
// TODO(bazel-team): class objects are not really hashable or comparable for equality other than
// by reference. We should identify the aspect here in a way that does not rely on comparison
// by reference so that keys can be serialized and deserialized properly.