aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaProtoAspect.java
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2018-07-09 12:16:24 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-07-09 12:18:00 -0700
commite8956648d1c94a3a51e1aba5d229d1f27bdf8e35 (patch)
treef0549f7f73ceeefc1635e4f2f746da14b096e3ef /src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaProtoAspect.java
parent68e92b45a37f2142c768a56eb7ecfa484b8b22df (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/java/proto/JavaProtoAspect.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaProtoAspect.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaProtoAspect.java b/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaProtoAspect.java
index 3c64f91a7d..2df7c12d15 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaProtoAspect.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaProtoAspect.java
@@ -281,6 +281,7 @@ public class JavaProtoAspect extends NativeAspectClass implements ConfiguredAspe
supportData.getTransitiveImports(),
supportData.getProtosInDirectDeps(),
supportData.getTransitiveProtoPathFlags(),
+ supportData.getDirectProtoSourceRoots(),
ruleContext.getLabel(),
ImmutableList.of(sourceJar),
"Java (Immutable)",