aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaLiteProtoLibrary.java
diff options
context:
space:
mode:
authorGravatar tomlu <tomlu@google.com>2017-09-19 15:50:28 +0200
committerGravatar László Csomor <laszlocsomor@google.com>2017-09-19 17:18:11 +0200
commitcd032d064b4283a8270b9f9a2b5b5b4383789f2b (patch)
treef7cdc2c74fba888cac2eefe59e069504f2b50460 /src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaLiteProtoLibrary.java
parent6ffdbf7a5ad8976e01df768a7c5537d9cd814bd9 (diff)
Wrap runtime jars and proto sources going into runfiles in a stable order nested set.
This saves memory, as the nested set would otherwise become flattened. Assuming the jars don't have duplicates files with the same root relative path in the same runfiles tree this won't make any semantic difference. PiperOrigin-RevId: 169234428
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaLiteProtoLibrary.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaLiteProtoLibrary.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaLiteProtoLibrary.java b/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaLiteProtoLibrary.java
index 6d1655e8ad..007bc85511 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaLiteProtoLibrary.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaLiteProtoLibrary.java
@@ -60,9 +60,11 @@ public class JavaLiteProtoLibrary implements RuleConfiguredTargetFactory {
JavaCompilationArgsProvider dependencyArgsProviders =
constructJcapFromAspectDeps(ruleContext, javaProtoLibraryAspectProviders);
+ // We assume that the runtime jars will not have conflicting artifacts
+ // with the same root relative path
Runfiles runfiles =
new Runfiles.Builder(ruleContext.getWorkspaceName())
- .addArtifacts(
+ .addTransitiveArtifactsWrappedInStableOrder(
dependencyArgsProviders.getRecursiveJavaCompilationArgs().getRuntimeJars())
.build();