aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/analysis/actions/SymlinkTreeAction.java
diff options
context:
space:
mode:
authorGravatar Benjamin Peterson <bp@benjamin.pe>2017-12-04 10:59:16 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2017-12-04 11:00:50 -0800
commit0885abd851b17d19661dfbd5459a5b91feb45620 (patch)
treed8b959248a001e5b96430e6c11dbfd7084eff79a /src/main/java/com/google/devtools/build/lib/analysis/actions/SymlinkTreeAction.java
parent2877735b363080bc7c2b3b52c882dffe73a85b3c (diff)
Remove some deadish Windows-related runfiles code.
In particular, SymlinkTreeAction no longer needs to accept artifacts as an input. --experimental_enable_runfiles now immediately reports an error on Windows. This mostly unwinds e4974e4cc6aeb437d36b3b36eb20142b7120fb16 ("Separate runfiles middlemen into two layers") and 41f4456ac2348bef66739194853a1ddadcbb887e ("Make runfiles tree creation on Windows depend on the artifacts of the actual runfiles."). See https://groups.google.com/d/msg/bazel-dev/btOAgxv434g/bDhTOOePAgAJ. Change-Id: Iac3308669bfc07abfd1c91445922269d8fdc2a26 PiperOrigin-RevId: 177837504
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/analysis/actions/SymlinkTreeAction.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/analysis/actions/SymlinkTreeAction.java21
1 files changed, 1 insertions, 20 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/actions/SymlinkTreeAction.java b/src/main/java/com/google/devtools/build/lib/analysis/actions/SymlinkTreeAction.java
index d0600db0a8..3b2750df5a 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/actions/SymlinkTreeAction.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/actions/SymlinkTreeAction.java
@@ -25,8 +25,6 @@ import com.google.devtools.build.lib.actions.ActionResult;
import com.google.devtools.build.lib.actions.Artifact;
import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable;
import com.google.devtools.build.lib.util.Fingerprint;
-import com.google.devtools.build.lib.vfs.Path;
-import javax.annotation.Nullable;
/**
* Action responsible for the symlink tree creation.
@@ -47,9 +45,6 @@ public final class SymlinkTreeAction extends AbstractAction {
* Creates SymlinkTreeAction instance.
* @param owner action owner
* @param inputManifest the input runfiles manifest
- * @param artifactMiddleman the middleman artifact representing all the files the symlinks
- * point to (on Windows we need to know if the target of a "symlink" is
- * a directory or a file so we need to build it before)
* @param outputManifest the generated symlink tree manifest
* (must have "MANIFEST" base name). Symlink tree root
* will be set to the artifact's parent directory.
@@ -59,12 +54,11 @@ public final class SymlinkTreeAction extends AbstractAction {
public SymlinkTreeAction(
ActionOwner owner,
Artifact inputManifest,
- @Nullable Artifact artifactMiddleman,
Artifact outputManifest,
boolean filesetTree,
ImmutableMap<String, String> shellEnvironment,
boolean enableRunfiles) {
- super(owner, computeInputs(inputManifest, artifactMiddleman), ImmutableList.of(outputManifest));
+ super(owner, ImmutableList.of(inputManifest), ImmutableList.of(outputManifest));
Preconditions.checkArgument(outputManifest.getPath().getBaseName().equals("MANIFEST"));
this.inputManifest = inputManifest;
this.outputManifest = outputManifest;
@@ -73,19 +67,6 @@ public final class SymlinkTreeAction extends AbstractAction {
this.enableRunfiles = enableRunfiles;
}
- private static ImmutableList<Artifact> computeInputs(
- Artifact inputManifest, Artifact artifactMiddleman) {
- ImmutableList.Builder<Artifact> result = ImmutableList.<Artifact>builder()
- .add(inputManifest);
- if (artifactMiddleman != null) {
- Path path = artifactMiddleman.getPath();
- if (!path.getFileSystem().supportsSymbolicLinksNatively(path)) {
- result.add(artifactMiddleman);
- }
- }
- return result.build();
- }
-
public Artifact getInputManifest() {
return inputManifest;
}