aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/actions/Artifact.java
diff options
context:
space:
mode:
authorGravatar shahan <shahan@google.com>2018-04-05 08:03:04 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-04-05 08:05:03 -0700
commite483df35c30cfb7b77fe46b9c2dee8114d4b5748 (patch)
treeee014ac7b592c28f3ae61a2672c23bd1d9843c62 /src/main/java/com/google/devtools/build/lib/actions/Artifact.java
parent0c148f361388369249b13cf5618a27873ac46bfb (diff)
Avoids calling getPath() in Artifact.toDetailString().
Also deletes obsolete Artifact.serializeToString() method. "Semantic" change: replaces the actual exec root with <execution_root> in the toString() representation. PiperOrigin-RevId: 191742669
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/actions/Artifact.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/actions/Artifact.java25
1 files changed, 4 insertions, 21 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/Artifact.java b/src/main/java/com/google/devtools/build/lib/actions/Artifact.java
index f0eca50638..bb8cd9875c 100644
--- a/src/main/java/com/google/devtools/build/lib/actions/Artifact.java
+++ b/src/main/java/com/google/devtools/build/lib/actions/Artifact.java
@@ -676,30 +676,13 @@ public class Artifact
return "[" + root + "]" + rootRelativePath;
} else {
// Derived Artifact: path and root are under execRoot
- PathFragment execRoot = trimTail(getPath().asFragment(), execPath);
- return "[["
- + execRoot
- + "]"
- + root.getRoot().asPath().asFragment().relativeTo(execRoot)
- + "]"
- + rootRelativePath;
+ //
+ // TODO(blaze-team): this is misleading beacuse execution_root isn't unique. Dig the
+ // workspace name out and print that also.
+ return "[[<execution_root>]" + root.getExecPath() + "]" + rootRelativePath;
}
}
- /**
- * Serializes this artifact to a string that has enough data to reconstruct the artifact.
- */
- public final String serializeToString() {
- // In theory, it should be enough to serialize execPath and rootRelativePath (which is a suffix
- // of execPath). However, in practice there is code around that uses other attributes which
- // needs cleaning up.
- String result = execPath + " /" + rootRelativePath.toString().length();
- if (getOwner() != null) {
- result += " " + getOwner();
- }
- return result;
- }
-
// ---------------------------------------------------------------------------
// Static methods to assist in working with Artifacts