aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/skyframe
diff options
context:
space:
mode:
authorGravatar Janak Ramakrishnan <janakr@google.com>2015-09-18 20:59:28 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2015-09-21 08:59:23 +0000
commitdad0a10d4f13a5629097e9c8dcc29dc42bb686e6 (patch)
tree133f1a36db628201afb93c9d8a8ea1d96f0314d9 /src/main/java/com/google/devtools/build/skyframe
parent0796d40a1c4bc84a53d5253a3f628f53fb9cdedc (diff)
Mark root causes as transient. Serializing nested sets is annoying, and since ErrorInfo doesn't override equality, there's no issue with preserving equality for now.
-- MOS_MIGRATED_REVID=103414237
Diffstat (limited to 'src/main/java/com/google/devtools/build/skyframe')
-rw-r--r--src/main/java/com/google/devtools/build/skyframe/ErrorInfo.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/skyframe/ErrorInfo.java b/src/main/java/com/google/devtools/build/skyframe/ErrorInfo.java
index 09925a3fb7..205afeaf90 100644
--- a/src/main/java/com/google/devtools/build/skyframe/ErrorInfo.java
+++ b/src/main/java/com/google/devtools/build/skyframe/ErrorInfo.java
@@ -20,6 +20,7 @@ import com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder;
import com.google.devtools.build.lib.collect.nestedset.Order;
import com.google.devtools.build.skyframe.SkyFunctionException.ReifiedSkyFunctionException;
+import java.io.IOException;
import java.io.Serializable;
import java.util.Collection;
@@ -31,10 +32,9 @@ import javax.annotation.Nullable;
* <p>This is intended only for use in alternative {@code MemoizingEvaluator} implementations.
*/
public class ErrorInfo implements Serializable {
- /**
- * The set of descendants of this value that failed to build
- */
- private final NestedSet<SkyKey> rootCauses;
+ /** The set of descendants of this value that failed to build. */
+ // Non-final only to allow for serialization.
+ private transient NestedSet<SkyKey> rootCauses;
/**
* An exception thrown upon a value's failure to build. The exception is used for reporting, and
@@ -154,4 +154,9 @@ public class ErrorInfo implements Serializable {
public boolean isCatastrophic() {
return isCatastrophic;
}
+
+ private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
+ in.defaultReadObject();
+ rootCauses = NestedSetBuilder.emptySet(Order.STABLE_ORDER);
+ }
}