aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2017-01-12 19:09:39 +0000
committerGravatar Marcel Hlopko <hlopko@google.com>2017-01-13 10:56:43 +0000
commit5e7e935a5461bf13e6c250e48d835539e55f5b38 (patch)
treed27ff3a2e5f4fe5166741aa9781089bfd447558e /src/main/java/com/google/devtools/build/lib
parent156adeec613ab140a91d73e1147bc688689bcfb7 (diff)
Handle the case where deploy_env causes partial extension information to be available to the extension registry generator.
With deploy_env, the message being extended may end up in the deploy_env binary's generated extension registry. However, the extension referencing that message is outside of deploy_env. For this case in the full runtime, we can synthesize the message as we don't need the loadPath (which is only used by lite runtime). Rollback of commit 34de5d7d4a0678b3a4097cb7531fedb3ddb45983. *** Reason for rollback *** Rolling forward *** Original change description *** Automated [] rollback of commit fa7e34979b1a10794321b1233e8d6f44a62431fa. -- PiperOrigin-RevId: 144346260 MOS_MIGRATED_REVID=144346260
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/java/proto/GeneratedExtensionRegistryProvider.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/proto/GeneratedExtensionRegistryProvider.java b/src/main/java/com/google/devtools/build/lib/rules/java/proto/GeneratedExtensionRegistryProvider.java
index 1c1e04e6a9..9d7fac6ace 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/java/proto/GeneratedExtensionRegistryProvider.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/java/proto/GeneratedExtensionRegistryProvider.java
@@ -18,6 +18,7 @@ import com.google.auto.value.AutoValue;
import com.google.common.base.Verify;
import com.google.devtools.build.lib.actions.Artifact;
import com.google.devtools.build.lib.analysis.TransitiveInfoProvider;
+import com.google.devtools.build.lib.cmdline.Label;
import com.google.devtools.build.lib.collect.nestedset.NestedSet;
import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable;
@@ -31,6 +32,9 @@ import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable;
@Immutable
public abstract class GeneratedExtensionRegistryProvider implements TransitiveInfoProvider {
+ /** @return the rule label for which this registry was built. */
+ public abstract Label getGeneratingRuleLabel();
+
/** @return if this registry was generated for lite or full runtime. */
public abstract boolean isLite();
@@ -50,6 +54,10 @@ public abstract class GeneratedExtensionRegistryProvider implements TransitiveIn
/** A builder for {@link GeneratedExtensionRegistryProvider}. */
@AutoValue.Builder
public abstract static class Builder {
+
+ /** Sets the rule label for which this registry was built. */
+ public abstract Builder setGeneratingRuleLabel(Label label);
+
/** Indicates this registry was built for lite runtime if <tt>true</tt>, full otherwise. */
public abstract Builder setLite(boolean lite);