Makes the decision to memoize at the SkyValue level.
PiperOrigin-RevId: 192158825
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/ASTFileLookupValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/ASTFileLookupValue.java
index 2bb6d1a..e42ba4e 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/ASTFileLookupValue.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/ASTFileLookupValue.java
@@ -45,7 +45,8 @@
public abstract String getErrorMsg();
/** If the file is found, this class encapsulates the parsed AST. */
- private static class ASTLookupWithFile extends ASTFileLookupValue {
+ @AutoCodec.VisibleForSerialization
+ public static class ASTLookupWithFile extends ASTFileLookupValue {
private final BuildFileAST ast;
private ASTLookupWithFile(BuildFileAST ast) {
@@ -71,7 +72,8 @@
}
/** If the file isn't found, this class encapsulates a message with the reason. */
- private static class ASTLookupNoFile extends ASTFileLookupValue {
+ @AutoCodec.VisibleForSerialization
+ public static class ASTLookupNoFile extends ASTFileLookupValue {
private final String errorMsg;
private ASTLookupNoFile(String errorMsg) {