Remove `NonexistentFileReceiver`.

PiperOrigin-RevId: 371146003
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/FileFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/FileFunction.java
index 8feb81d..b8531b4 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/FileFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/FileFunction.java
@@ -49,26 +49,9 @@
  */
 public class FileFunction implements SkyFunction {
   private final AtomicReference<PathPackageLocator> pkgLocator;
-  @Nullable private final NonexistentFileReceiver nonexistentFileReceiver;
-
-  /** Temporary interface to help track down why files are missing in some cases. */
-  public interface NonexistentFileReceiver {
-    void accept(
-        RootedPath rootedPath,
-        RootedPath realRootedPath,
-        RootedPath parentRootedPath,
-        FileValue parentFileValue);
-  }
 
   public FileFunction(AtomicReference<PathPackageLocator> pkgLocator) {
-    this(pkgLocator, null);
-  }
-
-  FileFunction(
-      AtomicReference<PathPackageLocator> pkgLocator,
-      @Nullable NonexistentFileReceiver nonexistentFileReceiver) {
     this.pkgLocator = pkgLocator;
-    this.nonexistentFileReceiver = nonexistentFileReceiver;
   }
 
   private static class SymlinkResolutionState {
@@ -168,7 +151,7 @@
    * {@code null} if there was a missing dep.
    */
   @Nullable
-  private PartialResolutionResult resolveFromAncestors(
+  private static PartialResolutionResult resolveFromAncestors(
       RootedPath rootedPath, SymlinkResolutionState symlinkResolutionState, Environment env)
       throws InterruptedException, FileFunctionException {
     RootedPath parentRootedPath = rootedPath.getParentDirectory();
@@ -178,7 +161,7 @@
   }
 
   @Nullable
-  private PartialResolutionResult resolveFromAncestorsWithParent(
+  private static PartialResolutionResult resolveFromAncestorsWithParent(
       RootedPath rootedPath,
       RootedPath parentRootedPath,
       SymlinkResolutionState symlinkResolutionState,
@@ -195,10 +178,6 @@
     rootedPathFromAncestors = getChild(parentFileValue.realRootedPath(), baseName);
 
     if (!parentFileValue.exists() || !parentFileValue.isDirectory()) {
-      if (nonexistentFileReceiver != null) {
-        nonexistentFileReceiver.accept(
-            rootedPath, rootedPathFromAncestors, parentRootedPath, parentFileValue);
-      }
       return new PartialResolutionResult(
           rootedPathFromAncestors, FileStateValue.NONEXISTENT_FILE_STATE_NODE);
     }
@@ -221,7 +200,7 @@
   }
 
   @Nullable
-  private PartialResolutionResult resolveFromAncestorsNoParent(
+  private static PartialResolutionResult resolveFromAncestorsNoParent(
       RootedPath rootedPath, SymlinkResolutionState symlinkResolutionState, Environment env)
       throws InterruptedException, FileFunctionException {
     checkAndNotePathSeenDuringPartialResolution(rootedPath, symlinkResolutionState, env);
@@ -278,7 +257,7 @@
     return resolveFromAncestors(symlinkTargetRootedPath, symlinkResolutionState, env);
   }
 
-  private void checkAndNotePathSeenDuringPartialResolution(
+  private static void checkAndNotePathSeenDuringPartialResolution(
       RootedPath rootedPath, SymlinkResolutionState symlinkResolutionState, Environment env)
       throws FileFunctionException, InterruptedException {
     Path path = rootedPath.asPath();
@@ -287,14 +266,14 @@
     symlinkResolutionState.logicalChain.add(rootedPath);
   }
 
-  private void checkPathSeenDuringPartialResolution(
+  private static void checkPathSeenDuringPartialResolution(
       RootedPath rootedPath, SymlinkResolutionState symlinkResolutionState, Environment env)
       throws FileFunctionException, InterruptedException {
     checkPathSeenDuringPartialResolutionInternal(
         rootedPath, rootedPath.asPath(), symlinkResolutionState, env);
   }
 
-  private void checkPathSeenDuringPartialResolutionInternal(
+  private static void checkPathSeenDuringPartialResolutionInternal(
       RootedPath rootedPath,
       Path path,
       SymlinkResolutionState symlinkResolutionState,
@@ -345,8 +324,9 @@
                   Iterables.concat(
                       symlinkResolutionState.logicalChain, ImmutableList.of(rootedPath))));
       uniquenessKey = FileSymlinkInfiniteExpansionUniquenessFunction.key(pathAndChain.getSecond());
-      fse = new FileSymlinkInfiniteExpansionException(
-          pathAndChain.getFirst(), pathAndChain.getSecond());
+      fse =
+          new FileSymlinkInfiniteExpansionException(
+              pathAndChain.getFirst(), pathAndChain.getSecond());
     } else if (seenCeilingPath != null && seenCeilingPath.startsWith(path)) {
       // 'rootedPath' is [transitively] a symlink to an ancestor of a previous element in the
       // symlink chain (iii).
@@ -374,13 +354,8 @@
     }
   }
 
-  private static final Predicate<RootedPath> isPathPredicate(final Path path) {
-    return new Predicate<RootedPath>() {
-      @Override
-      public boolean apply(RootedPath rootedPath) {
-        return rootedPath.asPath().equals(path);
-      }
-    };
+  private static Predicate<RootedPath> isPathPredicate(Path path) {
+    return rootedPath -> rootedPath.asPath().equals(path);
   }
 
   @Nullable
@@ -390,11 +365,11 @@
   }
 
   /**
-   * Used to declare all the exception types that can be wrapped in the exception thrown by
-   * {@link FileFunction#compute}.
+   * Used to declare all the exception types that can be wrapped in the exception thrown by {@link
+   * FileFunction#compute}.
    */
   private static final class FileFunctionException extends SkyFunctionException {
-    public FileFunctionException(IOException e, Transience transience) {
+    FileFunctionException(IOException e, Transience transience) {
       super(e, transience);
     }
   }
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java b/src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java
index 9e9638b..806f2d6 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java
@@ -117,7 +117,6 @@
 import java.util.Map;
 import java.util.Set;
 import java.util.UUID;
-import java.util.concurrent.Callable;
 import java.util.function.Consumer;
 import javax.annotation.Nullable;
 
@@ -196,7 +195,6 @@
         defaultBuildOptions,
         new PackageProgressReceiver(),
         new ConfiguredTargetProgressReceiver(),
-        /*nonexistentFileReceiver=*/ null,
         managedDirectoriesKnowledge,
         bugReporter);
     this.diffAwarenessManager = new DiffAwarenessManager(diffAwarenessFactories);
@@ -892,18 +890,15 @@
     try {
       progressReceiver.ignoreInvalidations = true;
       Uninterruptibles.callUninterruptibly(
-          new Callable<Void>() {
-            @Override
-            public Void call() throws InterruptedException {
-              EvaluationContext evaluationContext =
-                  EvaluationContext.newBuilder()
-                      .setKeepGoing(false)
-                      .setNumThreads(ResourceUsage.getAvailableProcessors())
-                      .setEventHandler(eventHandler)
-                      .build();
-              getDriver().evaluate(ImmutableList.of(), evaluationContext);
-              return null;
-            }
+          () -> {
+            EvaluationContext evaluationContext =
+                EvaluationContext.newBuilder()
+                    .setKeepGoing(false)
+                    .setNumThreads(ResourceUsage.getAvailableProcessors())
+                    .setEventHandler(eventHandler)
+                    .build();
+            getDriver().evaluate(ImmutableList.of(), evaluationContext);
+            return null;
           });
     } catch (Exception e) {
       throw new IllegalStateException(e);
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java
index 4088027..5ab98c5 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java
@@ -162,7 +162,6 @@
 import com.google.devtools.build.lib.skyframe.AspectValueKey.AspectKey;
 import com.google.devtools.build.lib.skyframe.DirtinessCheckerUtils.FileDirtinessChecker;
 import com.google.devtools.build.lib.skyframe.ExternalFilesHelper.ExternalFileAction;
-import com.google.devtools.build.lib.skyframe.FileFunction.NonexistentFileReceiver;
 import com.google.devtools.build.lib.skyframe.MetadataConsumerForMetrics.FilesMetricConsumer;
 import com.google.devtools.build.lib.skyframe.PackageFunction.ActionOnIOExceptionReadingBuildFile;
 import com.google.devtools.build.lib.skyframe.PackageFunction.IncrementalityIntent;
@@ -371,7 +370,6 @@
   private int lastConcurrencyLevel = -1;
 
   private final PathResolverFactory pathResolverFactory = new PathResolverFactoryImpl();
-  @Nullable private final NonexistentFileReceiver nonexistentFileReceiver;
 
   private boolean siblingRepositoryLayout = false;
 
@@ -423,7 +421,6 @@
       BuildOptions defaultBuildOptions,
       @Nullable PackageProgressReceiver packageProgress,
       @Nullable ConfiguredTargetProgressReceiver configuredTargetProgress,
-      @Nullable NonexistentFileReceiver nonexistentFileReceiver,
       @Nullable ManagedDirectoriesKnowledge managedDirectoriesKnowledge,
       BugReporter bugReporter) {
     // Strictly speaking, these arguments are not required for initialization, but all current
@@ -433,7 +430,6 @@
     this.pkgFactory = pkgFactory;
     this.shouldUnblockCpuWorkWhenFetchingDeps = shouldUnblockCpuWorkWhenFetchingDeps;
     this.graphInconsistencyReceiver = graphInconsistencyReceiver;
-    this.nonexistentFileReceiver = nonexistentFileReceiver;
     this.bugReporter = bugReporter;
     this.pkgFactory.setSyscalls(syscalls);
     this.workspaceStatusActionFactory = workspaceStatusActionFactory;
@@ -507,7 +503,7 @@
     map.put(
         FileSymlinkInfiniteExpansionUniquenessFunction.NAME,
         new FileSymlinkInfiniteExpansionUniquenessFunction());
-    map.put(FileValue.FILE, new FileFunction(pkgLocator, nonexistentFileReceiver));
+    map.put(FileValue.FILE, new FileFunction(pkgLocator));
     map.put(SkyFunctions.DIRECTORY_LISTING, new DirectoryListingFunction());
     map.put(
         SkyFunctions.PACKAGE_LOOKUP,