diff options
author | Michael Thvedt <mthvedt@google.com> | 2015-11-09 18:08:51 +0000 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2015-11-10 10:23:10 +0000 |
commit | adab27ed11f824db43277eec05278c5d583cd430 (patch) | |
tree | 96adb01c5d30d4fd7a8a2171cebd23ebf08068ec /src/main/java/com/google/devtools/build/lib/rules/proto/BazelProtoLibrary.java | |
parent | bca82ad9c0a4b69ae1598d8a1a3eab0d088ed6e9 (diff) |
Change ProtoSourcesProvider to only export direct sources. Add a method, getCheckDepsProtoSources(), to get any indirect sources from alias library cases.
--
MOS_MIGRATED_REVID=107395192
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/proto/BazelProtoLibrary.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/proto/BazelProtoLibrary.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/proto/BazelProtoLibrary.java b/src/main/java/com/google/devtools/build/lib/rules/proto/BazelProtoLibrary.java index 478a676d87..cada50761e 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/proto/BazelProtoLibrary.java +++ b/src/main/java/com/google/devtools/build/lib/rules/proto/BazelProtoLibrary.java @@ -33,7 +33,7 @@ public class BazelProtoLibrary implements RuleConfiguredTargetFactory { public ConfiguredTarget create(RuleContext ruleContext) throws InterruptedException { ImmutableList<Artifact> protoSources = ruleContext.getPrerequisiteArtifacts("srcs", Mode.TARGET).list(); - ImmutableList<Artifact> directProtoSources = ProtoCommon.getDirectProtoSources( + ImmutableList<Artifact> checkDepsProtoSources = ProtoCommon.getCheckDepsProtoSources( ruleContext, protoSources); ProtoCommon.checkSourceFilesAreInSamePackage(ruleContext); @@ -44,7 +44,8 @@ public class BazelProtoLibrary implements RuleConfiguredTargetFactory { ProtoCommon.createRunfilesProvider(transitiveImports, ruleContext); // TODO(bazel-team): this second constructor argument is superfluous and should be removed. ProtoSourcesProvider sourcesProvider = - new ProtoSourcesProvider(transitiveImports, transitiveImports, directProtoSources); + new ProtoSourcesProvider( + transitiveImports, transitiveImports, protoSources, checkDepsProtoSources); return new RuleConfiguredTargetBuilder(ruleContext) .add(RunfilesProvider.class, runfilesProvider) |