aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/proto/SupportData.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/proto/SupportData.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/proto/SupportData.java18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/proto/SupportData.java b/src/main/java/com/google/devtools/build/lib/rules/proto/SupportData.java
index b3644d4c17..35c0cee485 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/proto/SupportData.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/proto/SupportData.java
@@ -22,6 +22,7 @@ import com.google.devtools.build.lib.analysis.TransitiveInfoCollection;
import com.google.devtools.build.lib.collect.nestedset.NestedSet;
import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable;
import com.google.devtools.build.lib.skyframe.serialization.autocodec.AutoCodec;
+import javax.annotation.Nullable;
/** A helper class for the *Support classes containing some data from ProtoLibrary. */
@AutoCodec
@@ -37,7 +38,9 @@ public abstract class SupportData {
NestedSet<String> transitiveProtoPathFlags,
String protoSourceRoot,
NestedSet<String> directProtoSourceRoots,
- boolean hasProtoSources) {
+ boolean hasProtoSources,
+ @Nullable NestedSet<Artifact> protosInExports,
+ @Nullable NestedSet<String> exportedProtoSourceRoots) {
return new AutoValue_SupportData(
nonWeakDepsPredicate,
directProtoSources,
@@ -46,7 +49,9 @@ public abstract class SupportData {
transitiveProtoPathFlags,
protoSourceRoot,
directProtoSourceRoots,
- hasProtoSources);
+ hasProtoSources,
+ protosInExports,
+ exportedProtoSourceRoots);
}
public abstract Predicate<TransitiveInfoCollection> getNonWeakDepsPredicate();
@@ -76,5 +81,14 @@ public abstract class SupportData {
public abstract boolean hasProtoSources();
+ /** .proto files in the exported dependencies of this proto_library. */
+ public abstract @Nullable NestedSet<Artifact> getProtosInExports();
+
+ /**
+ * The {@code proto_source_root}'s collected from the current library and the exported
+ * dependencies.
+ */
+ public abstract @Nullable NestedSet<String> getExportedProtoSourceRoots();
+
SupportData() {}
}