diff options
author | 2015-03-06 18:16:10 +0000 | |
---|---|---|
committer | 2015-03-10 13:57:19 +0000 | |
commit | 1f820798e616eedc2c7445acaa447bb0bf122acb (patch) | |
tree | 998db5412c272811ac01a66f19eed0419fa74cc5 /src/main/java/com/google | |
parent | 895599527f9ef135f24be1374acd61020e2db25f (diff) |
Remove the unused and weird "omit a random symlink from the runfiles being merged" functionality from Runfiles.Builder.
--
MOS_MIGRATED_REVID=87954443
Diffstat (limited to 'src/main/java/com/google')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/analysis/Runfiles.java | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/Runfiles.java b/src/main/java/com/google/devtools/build/lib/analysis/Runfiles.java index 4a95531c46..6c06a186fc 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/Runfiles.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/Runfiles.java @@ -17,14 +17,12 @@ package com.google.devtools.build.lib.analysis; import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Function; import com.google.common.base.Preconditions; -import com.google.common.base.Predicates; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Iterables; import com.google.common.collect.Maps; import com.google.devtools.build.lib.Constants; import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.analysis.RuleConfiguredTarget.Mode; -import com.google.devtools.build.lib.analysis.Runfiles.Builder; import com.google.devtools.build.lib.collect.nestedset.NestedSet; import com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder; import com.google.devtools.build.lib.collect.nestedset.Order; @@ -567,45 +565,12 @@ public final class Runfiles { * @param runfilesSupport the runfiles support to be merged in */ public Builder merge(@Nullable RunfilesSupport runfilesSupport) { - return merge(runfilesSupport, null); - } - - /** - * Merges runfiles from a given runfiles support. - * - * <p>Sometimes a particular symlink from the runfiles support must not be included in runfiles. - * In such cases the path fragment denoting the symlink should be passed in as {@code - * ommittedAdditionalSymlink}. The symlink will then be filtered away from the set of additional - * symlinks of the target. - * - * @param runfilesSupport the runfiles support to be merged in - * @param omittedAdditionalSymlink the symlink to be omitted, or null if no filtering is needed - */ - public Builder merge(@Nullable RunfilesSupport runfilesSupport, - @Nullable final PathFragment omittedAdditionalSymlink) { if (runfilesSupport == null) { return this; } // TODO(bazel-team): We may be able to remove this now. addArtifact(runfilesSupport.getRunfilesMiddleman()); - Runfiles runfiles = runfilesSupport.getRunfiles(); - if (omittedAdditionalSymlink == null) { - merge(runfiles); - } else { - artifactsBuilder.addTransitive(runfiles.getUnconditionalArtifacts()); - symlinksBuilder.addAll(Maps.filterKeys(entriesToMap(runfiles.getSymlinks()), - Predicates.not(Predicates.equalTo(omittedAdditionalSymlink))).entrySet()); - rootSymlinksBuilder.addTransitive(runfiles.getRootSymlinks()); - pruningManifestsBuilder.addTransitive(runfiles.getPruningManifests()); - if (manifestExpander == DUMMY_SYMLINK_EXPANDER) { - manifestExpander = runfiles.getSymlinkExpander(); - } else { - Function<Map<PathFragment, Artifact>, Map<PathFragment, Artifact>> otherExpander = - runfiles.getSymlinkExpander(); - Preconditions.checkState((otherExpander == DUMMY_SYMLINK_EXPANDER) - || manifestExpander.equals(otherExpander)); - } - } + merge(runfilesSupport.getRunfiles()); return this; } |