aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaLiteProtoAspect.java
diff options
context:
space:
mode:
authorGravatar elenairina <elenairina@google.com>2018-02-20 06:26:33 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2018-02-20 06:27:57 -0800
commit5deca4cf88f5568771f2c836a9b8c693b88bd749 (patch)
tree1ab038e4bf10301e0e8878c21e9693091b78e304 /src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaLiteProtoAspect.java
parent9ac10696da052d1327b3f1cd276b2ab50fe1fee1 (diff)
Accept proto paths relative to proto_source_root as direct dependencies.
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: 186294997
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaLiteProtoAspect.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaLiteProtoAspect.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaLiteProtoAspect.java b/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaLiteProtoAspect.java
index 6a2417de70..823ebca1ed 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaLiteProtoAspect.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaLiteProtoAspect.java
@@ -247,6 +247,7 @@ public class JavaLiteProtoAspect extends NativeAspectClass implements Configured
supportData.getTransitiveImports(),
supportData.getProtosInDirectDeps(),
supportData.getTransitiveProtoPathFlags(),
+ supportData.getDirectProtoSourceRoots(),
ruleContext.getLabel(),
ImmutableList.of(sourceJar),
"JavaLite",