diff options
author | Googler <noreply@google.com> | 2018-07-09 12:16:24 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-07-09 12:18:00 -0700 |
commit | e8956648d1c94a3a51e1aba5d229d1f27bdf8e35 (patch) | |
tree | f0549f7f73ceeefc1635e4f2f746da14b096e3ef /src/main/java/com/google/devtools/build/lib/rules/proto/SupportData.java | |
parent | 68e92b45a37f2142c768a56eb7ecfa484b8b22df (diff) |
[Reland] Accept proto paths relative to proto_source_root as direct dependencies.
This is a reland of https://github.com/bazelbuild/bazel/commit/5deca4cf88f5568771f2c836a9b8c693b88bd749.
This will make protoc see as direct dependencies the .proto files that were included using the proto_source_root flag.
Until now, Bazel passed to protoc the direct dependencies of a target as the path relative to the WORKSPACE, which made it fail when a shorter path, relative to the package was used.
Progress on #4544.
RELNOTES: None.
PiperOrigin-RevId: 203808292
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.java | 7 |
1 files changed, 7 insertions, 0 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 d21a4d9d60..c3bc3aa553 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 @@ -35,6 +35,7 @@ public abstract class SupportData { NestedSet<Artifact> protosInDirectDeps, NestedSet<Artifact> transitiveImports, NestedSet<String> transitiveProtoPathFlags, + NestedSet<String> directProtoSourceRoots, boolean hasProtoSources) { return new AutoValue_SupportData( nonWeakDepsPredicate, @@ -42,6 +43,7 @@ public abstract class SupportData { transitiveImports, protosInDirectDeps, transitiveProtoPathFlags, + directProtoSourceRoots, hasProtoSources); } @@ -62,6 +64,11 @@ public abstract class SupportData { */ public abstract NestedSet<String> getTransitiveProtoPathFlags(); + /** + * The {@code proto_source_root}'s collected from the current library and the direct dependencies. + */ + public abstract NestedSet<String> getDirectProtoSourceRoots(); + public abstract boolean hasProtoSources(); SupportData() {} |