diff options
author | 2017-09-19 15:50:28 +0200 | |
---|---|---|
committer | 2017-09-19 17:18:11 +0200 | |
commit | cd032d064b4283a8270b9f9a2b5b5b4383789f2b (patch) | |
tree | f7cdc2c74fba888cac2eefe59e069504f2b50460 /src/main/java/com/google/devtools/build/lib/rules/proto | |
parent | 6ffdbf7a5ad8976e01df768a7c5537d9cd814bd9 (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/proto')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/proto/ProtoCommon.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoCommon.java b/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoCommon.java index 24ae5dc47c..3d2d55567e 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoCommon.java +++ b/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoCommon.java @@ -120,11 +120,11 @@ public class ProtoCommon { public static Runfiles.Builder createDataRunfilesProvider( final NestedSet<Artifact> transitiveProtoSources, RuleContext ruleContext) { + // We assume that the proto sources will not have conflicting artifacts + // with the same root relative path return new Runfiles.Builder( ruleContext.getWorkspaceName(), ruleContext.getConfiguration().legacyExternalRunfiles()) - // TODO(bazel-team): addArtifacts is deprecated, but addTransitive fails - // due to nested set ordering restrictions. Figure this out. - .addArtifacts(transitiveProtoSources); + .addTransitiveArtifactsWrappedInStableOrder(transitiveProtoSources); } // ================================================================= |