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/pkgcache/IncrementalLoadingTest.java b/src/test/java/com/google/devtools/build/lib/pkgcache/IncrementalLoadingTest.java
index 2c4b00f..5aa200d 100644
--- a/src/test/java/com/google/devtools/build/lib/pkgcache/IncrementalLoadingTest.java
+++ b/src/test/java/com/google/devtools/build/lib/pkgcache/IncrementalLoadingTest.java
@@ -491,7 +491,10 @@
packageCacheOptions.showLoadingProgress = true;
packageCacheOptions.globbingThreads = 7;
skyframeExecutor.preparePackageLoading(
- new PathPackageLocator(outputBase, ImmutableList.of(workspace)),
+ new PathPackageLocator(
+ outputBase,
+ ImmutableList.of(workspace),
+ BazelSkyframeExecutorConstants.BUILD_FILES_BY_PRIORITY),
packageCacheOptions,
Options.getDefaults(SkylarkSemanticsOptions.class),
"",
@@ -579,7 +582,10 @@
packageCacheOptions.showLoadingProgress = true;
packageCacheOptions.globbingThreads = 7;
skyframeExecutor.preparePackageLoading(
- new PathPackageLocator(outputBase, ImmutableList.of(workspace)),
+ new PathPackageLocator(
+ outputBase,
+ ImmutableList.of(workspace),
+ BazelSkyframeExecutorConstants.BUILD_FILES_BY_PRIORITY),
packageCacheOptions,
Options.getDefaults(SkylarkSemanticsOptions.class),
"",