Do not necessarily watch for changes under '/'.
Before, we requested the root of external repositories using a Root of '/', which made Bazel climb up the directory tree until '/' when resolving symlinks when statting the locations where remote repositories are fetched. This is something that is not done for the main repository.
For the sake of efficiency and consistency, treat the actual location of external repositories the same as the main repository and do not register paths above their roots in Skyframe.
In addition, special-case the `@bazel_tools` repository so that the aforementioned ascent does not happen for its source (which should happen for every ther local repository).
RELNOTES: None.
PiperOrigin-RevId: 447409159
diff --git a/src/main/java/com/google/devtools/build/lib/rules/repository/LocalRepositoryFunction.java b/src/main/java/com/google/devtools/build/lib/rules/repository/LocalRepositoryFunction.java
index 4709d5c..22f135a 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/repository/LocalRepositoryFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/repository/LocalRepositoryFunction.java
@@ -50,7 +50,7 @@
Path targetPath = directories.getWorkspace().getRelative(userDefinedPath);
RepositoryDirectoryValue.Builder result =
RepositoryDelegatorFunction.symlinkRepoRoot(
- outputDirectory, targetPath, userDefinedPath, env);
+ directories, outputDirectory, targetPath, userDefinedPath, env);
if (result != null) {
env.getListener().post(resolve(rule, directories));
}
diff --git a/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java b/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java
index 21bd2ec..a49a67c 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorFunction.java
@@ -136,7 +136,11 @@
}
public static RepositoryDirectoryValue.Builder symlinkRepoRoot(
- Path source, Path destination, String userDefinedPath, Environment env)
+ BlazeDirectories directories,
+ Path source,
+ Path destination,
+ String userDefinedPath,
+ Environment env)
throws RepositoryFunctionException, InterruptedException {
try {
source.createSymbolicLink(destination);
@@ -153,8 +157,17 @@
// Check that the target directory exists and is a directory.
// Note that we have to check `destination` and not `source` here, otherwise we'd have a
// circular dependency between SkyValues.
- RootedPath targetDirRootedPath =
- RootedPath.toRootedPath(Root.absoluteRoot(destination.getFileSystem()), destination);
+ RootedPath targetDirRootedPath;
+ if (destination.startsWith(directories.getInstallBase())) {
+ // The install base only changes with the Bazel binary so it's acceptable not to add its
+ // ancestors as Skyframe dependencies.
+ targetDirRootedPath =
+ RootedPath.toRootedPath(Root.fromPath(destination), PathFragment.EMPTY_FRAGMENT);
+ } else {
+ targetDirRootedPath =
+ RootedPath.toRootedPath(Root.absoluteRoot(destination.getFileSystem()), destination);
+ }
+
FileValue targetDirValue;
try {
targetDirValue =
@@ -472,7 +485,11 @@
setupRepositoryRoot(repoRoot);
RepositoryDirectoryValue.Builder directoryValue =
symlinkRepoRoot(
- repoRoot, directories.getWorkspace().getRelative(sourcePath), pathAttr, env);
+ directories,
+ repoRoot,
+ directories.getWorkspace().getRelative(sourcePath),
+ pathAttr,
+ env);
if (directoryValue == null) {
return null;
}
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/BUILD b/src/main/java/com/google/devtools/build/lib/skyframe/BUILD
index 36ca983..5f865a7 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/BUILD
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/BUILD
@@ -1293,6 +1293,7 @@
deps = [
":cycle_utils",
"//src/main/java/com/google/devtools/build/lib/actions:file_metadata",
+ "//src/main/java/com/google/devtools/build/lib/analysis:blaze_directories",
"//src/main/java/com/google/devtools/build/lib/io:file_symlink_cycle_exception",
"//src/main/java/com/google/devtools/build/lib/io:file_symlink_cycle_uniqueness_function",
"//src/main/java/com/google/devtools/build/lib/io:file_symlink_exception",
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 1ba4d52..88128b1 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
@@ -21,6 +21,7 @@
import com.google.devtools.build.lib.actions.FileStateType;
import com.google.devtools.build.lib.actions.FileStateValue;
import com.google.devtools.build.lib.actions.FileValue;
+import com.google.devtools.build.lib.analysis.BlazeDirectories;
import com.google.devtools.build.lib.io.FileSymlinkCycleException;
import com.google.devtools.build.lib.io.FileSymlinkCycleUniquenessFunction;
import com.google.devtools.build.lib.io.FileSymlinkException;
@@ -30,6 +31,7 @@
import com.google.devtools.build.lib.util.Pair;
import com.google.devtools.build.lib.vfs.Path;
import com.google.devtools.build.lib.vfs.PathFragment;
+import com.google.devtools.build.lib.vfs.Root;
import com.google.devtools.build.lib.vfs.RootedPath;
import com.google.devtools.build.skyframe.SkyFunction;
import com.google.devtools.build.skyframe.SkyFunctionException;
@@ -49,9 +51,15 @@
*/
public class FileFunction implements SkyFunction {
private final AtomicReference<PathPackageLocator> pkgLocator;
+ private final ImmutableList<Root> immutablePaths;
- public FileFunction(AtomicReference<PathPackageLocator> pkgLocator) {
+ public FileFunction(
+ AtomicReference<PathPackageLocator> pkgLocator, BlazeDirectories directories) {
this.pkgLocator = pkgLocator;
+ this.immutablePaths =
+ ImmutableList.of(
+ Root.fromPath(directories.getOutputBase()),
+ Root.fromPath(directories.getInstallBase()));
}
private static class SymlinkResolutionState {
@@ -142,7 +150,11 @@
}
private RootedPath toRootedPath(Path path) {
- return RootedPath.toRootedPathMaybeUnderRoot(path, pkgLocator.get().getPathEntries());
+ // We check whether the path to be transformed is under the output base or the install base.
+ // These directories are under the control of Bazel and it therefore does not make much sense
+ // to check for changes in them or in their ancestors in the usual Skyframe way.
+ return RootedPath.toRootedPathMaybeUnderRoot(
+ path, Iterables.concat(pkgLocator.get().getPathEntries(), immutablePaths));
}
/**
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 eec580a..5706be1 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
@@ -503,7 +503,7 @@
map.put(
FileSymlinkInfiniteExpansionUniquenessFunction.NAME,
new FileSymlinkInfiniteExpansionUniquenessFunction());
- map.put(FileValue.FILE, new FileFunction(pkgLocator));
+ map.put(FileValue.FILE, new FileFunction(pkgLocator, directories));
map.put(SkyFunctions.DIRECTORY_LISTING, new DirectoryListingFunction());
map.put(
SkyFunctions.PACKAGE_LOOKUP,
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/packages/AbstractPackageLoader.java b/src/main/java/com/google/devtools/build/lib/skyframe/packages/AbstractPackageLoader.java
index 79ee882..9322917 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/packages/AbstractPackageLoader.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/packages/AbstractPackageLoader.java
@@ -464,7 +464,7 @@
.put(
FileSymlinkInfiniteExpansionUniquenessFunction.NAME,
new FileSymlinkInfiniteExpansionUniquenessFunction())
- .put(FileValue.FILE, new FileFunction(pkgLocatorRef))
+ .put(FileValue.FILE, new FileFunction(pkgLocatorRef, directories))
.put(
SkyFunctions.PACKAGE_LOOKUP,
new PackageLookupFunction(
diff --git a/src/main/java/com/google/devtools/build/lib/vfs/RootedPath.java b/src/main/java/com/google/devtools/build/lib/vfs/RootedPath.java
index ecb9c76..73a575c 100644
--- a/src/main/java/com/google/devtools/build/lib/vfs/RootedPath.java
+++ b/src/main/java/com/google/devtools/build/lib/vfs/RootedPath.java
@@ -72,8 +72,8 @@
}
/**
- * Returns a rooted path representing {@code path} under one of the package roots, or under the
- * filesystem root if it's not under any package root.
+ * Returns a rooted path representing {@code path} under one of the specified roots, or under the
+ * file system root if it's not under any of the roots in {@code packagePathRoots}.
*/
public static RootedPath toRootedPathMaybeUnderRoot(Path path, Iterable<Root> packagePathRoots) {
for (Root root : packagePathRoots) {
diff --git a/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/BzlmodRepoRuleFunctionTest.java b/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/BzlmodRepoRuleFunctionTest.java
index b264af9..25a2b9e 100644
--- a/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/BzlmodRepoRuleFunctionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/BzlmodRepoRuleFunctionTest.java
@@ -129,7 +129,7 @@
evaluator =
new InMemoryMemoizingEvaluator(
ImmutableMap.<SkyFunctionName, SkyFunction>builder()
- .put(FileValue.FILE, new FileFunction(packageLocator))
+ .put(FileValue.FILE, new FileFunction(packageLocator, directories))
.put(
FileStateKey.FILE_STATE,
new FileStateFunction(
diff --git a/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/BzlmodRepoRuleHelperTest.java b/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/BzlmodRepoRuleHelperTest.java
index 2c696c7..20bcbdf 100644
--- a/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/BzlmodRepoRuleHelperTest.java
+++ b/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/BzlmodRepoRuleHelperTest.java
@@ -105,7 +105,7 @@
evaluator =
new InMemoryMemoizingEvaluator(
ImmutableMap.<SkyFunctionName, SkyFunction>builder()
- .put(FileValue.FILE, new FileFunction(packageLocator))
+ .put(FileValue.FILE, new FileFunction(packageLocator, directories))
.put(
FileStateKey.FILE_STATE,
new FileStateFunction(
diff --git a/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/DiscoveryTest.java b/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/DiscoveryTest.java
index 80732e0..c3ba369 100644
--- a/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/DiscoveryTest.java
+++ b/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/DiscoveryTest.java
@@ -153,7 +153,7 @@
evaluator =
new InMemoryMemoizingEvaluator(
ImmutableMap.<SkyFunctionName, SkyFunction>builder()
- .put(FileValue.FILE, new FileFunction(packageLocator))
+ .put(FileValue.FILE, new FileFunction(packageLocator, directories))
.put(
FileStateKey.FILE_STATE,
new FileStateFunction(
diff --git a/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/ModuleExtensionResolutionTest.java b/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/ModuleExtensionResolutionTest.java
index e3292d1..eabc18d 100644
--- a/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/ModuleExtensionResolutionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/ModuleExtensionResolutionTest.java
@@ -158,7 +158,7 @@
evaluator =
new InMemoryMemoizingEvaluator(
ImmutableMap.<SkyFunctionName, SkyFunction>builder()
- .put(FileValue.FILE, new FileFunction(packageLocator))
+ .put(FileValue.FILE, new FileFunction(packageLocator, directories))
.put(
FileStateKey.FILE_STATE,
new FileStateFunction(
diff --git a/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/ModuleFileFunctionTest.java b/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/ModuleFileFunctionTest.java
index 7d8d9c1..38b8498 100644
--- a/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/ModuleFileFunctionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/bazel/bzlmod/ModuleFileFunctionTest.java
@@ -124,7 +124,7 @@
evaluator =
new InMemoryMemoizingEvaluator(
ImmutableMap.<SkyFunctionName, SkyFunction>builder()
- .put(FileValue.FILE, new FileFunction(packageLocator))
+ .put(FileValue.FILE, new FileFunction(packageLocator, directories))
.put(
FileStateKey.FILE_STATE,
new FileStateFunction(
diff --git a/src/test/java/com/google/devtools/build/lib/repository/ExternalPackageHelperTest.java b/src/test/java/com/google/devtools/build/lib/repository/ExternalPackageHelperTest.java
index 4ee129c..db69bdf 100644
--- a/src/test/java/com/google/devtools/build/lib/repository/ExternalPackageHelperTest.java
+++ b/src/test/java/com/google/devtools/build/lib/repository/ExternalPackageHelperTest.java
@@ -146,7 +146,7 @@
Suppliers.ofInstance(new TimestampGranularityMonitor(BlazeClock.instance())),
SyscallCache.NO_CACHE,
externalFilesHelper));
- skyFunctions.put(FileValue.FILE, new FileFunction(pkgLocator));
+ skyFunctions.put(FileValue.FILE, new FileFunction(pkgLocator, directories));
RuleClassProvider ruleClassProvider = analysisMock.createRuleClassProvider();
skyFunctions.put(
WorkspaceFileValue.WORKSPACE_FILE,
diff --git a/src/test/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorTest.java b/src/test/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorTest.java
index 853e7cd9..f3d1f15 100644
--- a/src/test/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorTest.java
+++ b/src/test/java/com/google/devtools/build/lib/rules/repository/RepositoryDelegatorTest.java
@@ -184,7 +184,7 @@
new TimestampGranularityMonitor(BlazeClock.instance())),
SyscallCache.NO_CACHE,
externalFilesHelper))
- .put(FileValue.FILE, new FileFunction(pkgLocator))
+ .put(FileValue.FILE, new FileFunction(pkgLocator, directories))
.put(SkyFunctions.REPOSITORY_DIRECTORY, delegatorFunction)
.put(
SkyFunctions.PACKAGE,
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/ArtifactFunctionTestCase.java b/src/test/java/com/google/devtools/build/lib/skyframe/ArtifactFunctionTestCase.java
index 232a266..7373c2d 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/ArtifactFunctionTestCase.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/ArtifactFunctionTestCase.java
@@ -108,7 +108,7 @@
new TimestampGranularityMonitor(BlazeClock.instance())),
SyscallCache.NO_CACHE,
externalFilesHelper))
- .put(FileValue.FILE, new FileFunction(pkgLocator))
+ .put(FileValue.FILE, new FileFunction(pkgLocator, directories))
.put(
Artifact.ARTIFACT,
new ArtifactFunction(
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/ContainingPackageLookupFunctionTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/ContainingPackageLookupFunctionTest.java
index 2685e12..de6712cce 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/ContainingPackageLookupFunctionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/ContainingPackageLookupFunctionTest.java
@@ -131,7 +131,7 @@
Suppliers.ofInstance(new TimestampGranularityMonitor(BlazeClock.instance())),
SyscallCache.NO_CACHE,
externalFilesHelper));
- skyFunctions.put(FileValue.FILE, new FileFunction(pkgLocator));
+ skyFunctions.put(FileValue.FILE, new FileFunction(pkgLocator, directories));
skyFunctions.put(SkyFunctions.DIRECTORY_LISTING, new DirectoryListingFunction());
skyFunctions.put(
SkyFunctions.DIRECTORY_LISTING_STATE,
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/FileFunctionTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/FileFunctionTest.java
index a0c7d83..ed31a26 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/FileFunctionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/FileFunctionTest.java
@@ -121,6 +121,7 @@
private InMemoryFileSystem fs;
private Root pkgRoot;
private Path outputBase;
+ private Root outputBaseRoot;
private PathPackageLocator pkgLocator;
private boolean fastDigest;
private ManualClock manualClock;
@@ -137,6 +138,7 @@
this.fs = fs;
pkgRoot = Root.fromPath(fs.getPath("/root"));
outputBase = fs.getPath("/output_base");
+ outputBaseRoot = Root.fromPath(outputBase);
pkgLocator =
new PathPackageLocator(
outputBase,
@@ -180,7 +182,7 @@
.put(
FileSymlinkInfiniteExpansionUniquenessFunction.NAME,
new FileSymlinkInfiniteExpansionUniquenessFunction())
- .put(FileValue.FILE, new FileFunction(pkgLocatorRef))
+ .put(FileValue.FILE, new FileFunction(pkgLocatorRef, directories))
.put(
SkyFunctions.PACKAGE,
new PackageFunction(
@@ -441,18 +443,16 @@
seenFiles.addAll(getFilesSeenAndAssertValueChangesIfContentsOfFileChanges("b", false, "a"));
seenFiles.addAll(
getFilesSeenAndAssertValueChangesIfContentsOfFileChanges(externalPath, true, "a"));
- Root root = Root.absoluteRoot(fs);
assertThat(seenFiles)
.containsExactly(
rootedPath("WORKSPACE"),
rootedPath("WORKSPACE.bazel"),
rootedPath("a"),
rootedPath(""),
- RootedPath.toRootedPath(root, PathFragment.create("/")),
- RootedPath.toRootedPath(root, PathFragment.create("/output_base")),
- RootedPath.toRootedPath(root, PathFragment.create("/output_base/external")),
- RootedPath.toRootedPath(root, PathFragment.create("/output_base/external/a")),
- RootedPath.toRootedPath(root, PathFragment.create("/output_base/external/a/b")));
+ rootedPath("/output_base"),
+ rootedPath("/output_base/external"),
+ rootedPath("/output_base/external/a"),
+ rootedPath("/output_base/external/a/b"));
}
@Test
@@ -1775,13 +1775,12 @@
}
private RootedPath rootedPath(String pathString) {
- Path path = path(pathString);
- for (Root root : pkgLocator.getPathEntries()) {
- if (root.contains(path)) {
- return RootedPath.toRootedPath(root, path);
- }
- }
- return RootedPath.toRootedPath(Root.absoluteRoot(fs), path);
+ ImmutableList<Root> roots =
+ ImmutableList.<Root>builder()
+ .addAll(pkgLocator.getPathEntries())
+ .add(outputBaseRoot)
+ .build();
+ return RootedPath.toRootedPathMaybeUnderRoot(path(pathString), roots);
}
private SkyKey skyKey(String pathString) {
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/FilesetEntryFunctionTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/FilesetEntryFunctionTest.java
index 6d56894..6445f5f 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/FilesetEntryFunctionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/FilesetEntryFunctionTest.java
@@ -91,15 +91,17 @@
outputBase,
ImmutableList.of(Root.fromPath(rootDirectory)),
BazelSkyframeExecutorConstants.BUILD_FILES_BY_PRIORITY));
+ BlazeDirectories directories =
+ new BlazeDirectories(
+ new ServerDirectories(outputBase, outputBase, outputBase),
+ rootDirectory,
+ /* defaultSystemJavabase= */ null,
+ TestConstants.PRODUCT_NAME);
ExternalFilesHelper externalFilesHelper =
ExternalFilesHelper.createForTesting(
pkgLocator,
ExternalFileAction.DEPEND_ON_EXTERNAL_PKG_FOR_EXTERNAL_REPO_PATHS,
- new BlazeDirectories(
- new ServerDirectories(outputBase, outputBase, outputBase),
- rootDirectory,
- /* defaultSystemJavabase= */ null,
- TestConstants.PRODUCT_NAME));
+ directories);
Map<SkyFunctionName, SkyFunction> skyFunctions = new HashMap<>();
@@ -109,7 +111,7 @@
Suppliers.ofInstance(new TimestampGranularityMonitor(BlazeClock.instance())),
SyscallCache.NO_CACHE,
externalFilesHelper));
- skyFunctions.put(FileValue.FILE, new FileFunction(pkgLocator));
+ skyFunctions.put(FileValue.FILE, new FileFunction(pkgLocator, directories));
skyFunctions.put(SkyFunctions.DIRECTORY_LISTING, new DirectoryListingFunction());
skyFunctions.put(
SkyFunctions.DIRECTORY_LISTING_STATE,
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/FilesystemValueCheckerTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/FilesystemValueCheckerTest.java
index cc9bbae..13f838e 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/FilesystemValueCheckerTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/FilesystemValueCheckerTest.java
@@ -302,7 +302,7 @@
Suppliers.ofInstance(new TimestampGranularityMonitor(BlazeClock.instance())),
SyscallCache.NO_CACHE,
externalFilesHelper));
- skyFunctions.put(FileValue.FILE, new FileFunction(pkgLocator));
+ skyFunctions.put(FileValue.FILE, new FileFunction(pkgLocator, directories));
skyFunctions.put(
FileSymlinkCycleUniquenessFunction.NAME, new FileSymlinkCycleUniquenessFunction());
skyFunctions.put(
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/GlobFunctionTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/GlobFunctionTest.java
index 1a820e9..b6296fd 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/GlobFunctionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/GlobFunctionTest.java
@@ -183,7 +183,7 @@
Suppliers.ofInstance(new TimestampGranularityMonitor(BlazeClock.instance())),
SyscallCache.NO_CACHE,
externalFilesHelper));
- skyFunctions.put(FileValue.FILE, new FileFunction(pkgLocator));
+ skyFunctions.put(FileValue.FILE, new FileFunction(pkgLocator, directories));
skyFunctions.put(
FileSymlinkCycleUniquenessFunction.NAME, new FileSymlinkCycleUniquenessFunction());
AnalysisMock analysisMock = AnalysisMock.get();
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/LocalRepositoryLookupFunctionTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/LocalRepositoryLookupFunctionTest.java
index 28ecc30..35f11c9 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/LocalRepositoryLookupFunctionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/LocalRepositoryLookupFunctionTest.java
@@ -100,7 +100,7 @@
Suppliers.ofInstance(new TimestampGranularityMonitor(BlazeClock.instance())),
SyscallCache.NO_CACHE,
externalFilesHelper));
- skyFunctions.put(FileValue.FILE, new FileFunction(pkgLocator));
+ skyFunctions.put(FileValue.FILE, new FileFunction(pkgLocator, directories));
skyFunctions.put(SkyFunctions.DIRECTORY_LISTING, new DirectoryListingFunction());
skyFunctions.put(
SkyFunctions.DIRECTORY_LISTING_STATE,
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/PackageLookupFunctionTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/PackageLookupFunctionTest.java
index fd0a1da..1f90a6b 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/PackageLookupFunctionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/PackageLookupFunctionTest.java
@@ -137,7 +137,7 @@
Suppliers.ofInstance(new TimestampGranularityMonitor(BlazeClock.instance())),
SyscallCache.NO_CACHE,
externalFilesHelper));
- skyFunctions.put(FileValue.FILE, new FileFunction(pkgLocator));
+ skyFunctions.put(FileValue.FILE, new FileFunction(pkgLocator, directories));
skyFunctions.put(SkyFunctions.DIRECTORY_LISTING, new DirectoryListingFunction());
skyFunctions.put(
SkyFunctions.DIRECTORY_LISTING_STATE,
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/RecursiveFilesystemTraversalFunctionTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/RecursiveFilesystemTraversalFunctionTest.java
index 0a76ee3..9402913 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/RecursiveFilesystemTraversalFunctionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/RecursiveFilesystemTraversalFunctionTest.java
@@ -150,7 +150,7 @@
Suppliers.ofInstance(new TimestampGranularityMonitor(BlazeClock.instance())),
SyscallCache.NO_CACHE,
externalFilesHelper));
- skyFunctions.put(FileValue.FILE, new FileFunction(pkgLocator));
+ skyFunctions.put(FileValue.FILE, new FileFunction(pkgLocator, directories));
skyFunctions.put(SkyFunctions.DIRECTORY_LISTING, new DirectoryListingFunction());
skyFunctions.put(
SkyFunctions.DIRECTORY_LISTING_STATE,
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/TimestampBuilderTestCase.java b/src/test/java/com/google/devtools/build/lib/skyframe/TimestampBuilderTestCase.java
index b0fde3a8..c5d4c2d 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/TimestampBuilderTestCase.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/TimestampBuilderTestCase.java
@@ -256,7 +256,7 @@
.put(
FileStateKey.FILE_STATE,
new FileStateFunction(() -> tsgm, SyscallCache.NO_CACHE, externalFilesHelper))
- .put(FileValue.FILE, new FileFunction(pkgLocator))
+ .put(FileValue.FILE, new FileFunction(pkgLocator, directories))
.put(
Artifact.ARTIFACT,
new ArtifactFunction(