Update PathPackageLocator to take a list of potential build file names,
instead of assuming BUILD.
- Default the list to the same value as PackageLookupFunction:
BUILD.bazel, BUILD.
- Move BuildFileNames to the packages package, so it is more generally
available.
Part of #4056.
Change-Id: Ie12512b492cd7d47a9e56ec3bc209f829feaf4b5
PiperOrigin-RevId: 177261295
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/PackageFunctionTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/PackageFunctionTest.java
index d08f3d3..a8c2316 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/PackageFunctionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/PackageFunctionTest.java
@@ -79,7 +79,10 @@
packageCacheOptions.globbingThreads = 7;
getSkyframeExecutor()
.preparePackageLoading(
- new PathPackageLocator(outputBase, ImmutableList.copyOf(roots)),
+ new PathPackageLocator(
+ outputBase,
+ ImmutableList.copyOf(roots),
+ BazelSkyframeExecutorConstants.BUILD_FILES_BY_PRIORITY),
packageCacheOptions,
Options.getDefaults(SkylarkSemanticsOptions.class),
"",
@@ -309,7 +312,10 @@
packageCacheOptions.globbingThreads = 7;
getSkyframeExecutor()
.preparePackageLoading(
- new PathPackageLocator(outputBase, ImmutableList.<Path>of(rootDirectory)),
+ new PathPackageLocator(
+ outputBase,
+ ImmutableList.<Path>of(rootDirectory),
+ BazelSkyframeExecutorConstants.BUILD_FILES_BY_PRIORITY),
packageCacheOptions,
Options.getDefaults(SkylarkSemanticsOptions.class),
"",