aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/proto/SupportData.java
diff options
context:
space:
mode:
authorGravatar Carmi Grushko <carmi@google.com>2016-11-18 21:15:55 +0000
committerGravatar Dmitry Lomov <dslomov@google.com>2016-11-21 19:39:08 +0000
commit49473f9e25aa610d6d4022e2c3e93828c9a8970a (patch)
tree370bdd099594759b4eca16be5ed3c2c42134842d /src/main/java/com/google/devtools/build/lib/rules/proto/SupportData.java
parente860316559eac366d47923a8eb4b5489a661aa35 (diff)
ProtoCompileActionBuilder can create strict-deps-checking command lines.
No behavior changes, for now. -- MOS_MIGRATED_REVID=139614509
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.java12
1 files changed, 10 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 762af4f7a3..4da9f2acfe 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
@@ -21,7 +21,7 @@ import com.google.devtools.build.lib.actions.Artifact;
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 javax.annotation.Nullable;
/**
* A helper class for the *Support classes containing some data from ProtoLibrary.
@@ -32,10 +32,11 @@ public abstract class SupportData {
public static SupportData create(
Predicate<TransitiveInfoCollection> nonWeakDepsPredicate,
ImmutableList<Artifact> protoSources,
+ @Nullable NestedSet<Artifact> protosInDirectDeps,
NestedSet<Artifact> transitiveImports,
boolean hasProtoSources) {
return new AutoValue_SupportData(
- nonWeakDepsPredicate, protoSources, transitiveImports, hasProtoSources);
+ nonWeakDepsPredicate, protoSources, transitiveImports, protosInDirectDeps, hasProtoSources);
}
public abstract Predicate<TransitiveInfoCollection> getNonWeakDepsPredicate();
@@ -44,6 +45,13 @@ public abstract class SupportData {
public abstract NestedSet<Artifact> getTransitiveImports();
+ /**
+ * .proto files in the direct dependencies of this proto_library. Used for strict deps checking.
+ * <code>null</code> means "strict deps checking is off".
+ */
+ @Nullable
+ public abstract NestedSet<Artifact> getProtosInDirectDeps();
+
public abstract boolean hasProtoSources();
SupportData() {}