Rename the BlacklistPackagePrefix family of classes and their related functions.
Rename BlacklistPackagePrefix to IgnoredPackagePrefix to reflect the fact that
this comes from the bazelignore file in repositories. Update all code references
referring to the blacklist to use a new variable or method name to reflect the
new class name.
RELNOTES: None
PiperOrigin-RevId: 318117736
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 0618e7f..efdd982 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
@@ -84,8 +84,7 @@
private SequentialBuildDriver driver;
private RecordingDifferencer differencer;
private Path emptyPackagePath;
- private static final String BLACKLISTED_PACKAGE_PREFIXES_FILE_PATH_STRING =
- "config/blacklisted.txt";
+ private static final String IGNORED_PACKAGE_PREFIXES_FILE_PATH_STRING = "config/ignored.txt";
protected abstract CrossRepositoryLabelViolationStrategy crossRepositoryLabelViolationStrategy();
@@ -134,9 +133,9 @@
new DirectoryListingStateFunction(
externalFilesHelper, new AtomicReference<>(UnixGlob.DEFAULT_SYSCALLS)));
skyFunctions.put(
- SkyFunctions.BLACKLISTED_PACKAGE_PREFIXES,
- new BlacklistedPackagePrefixesFunction(
- PathFragment.create(BLACKLISTED_PACKAGE_PREFIXES_FILE_PATH_STRING)));
+ SkyFunctions.IGNORED_PACKAGE_PREFIXES,
+ new IgnoredPackagePrefixesFunction(
+ PathFragment.create(IGNORED_PACKAGE_PREFIXES_FILE_PATH_STRING)));
RuleClassProvider ruleClassProvider = analysisMock.createRuleClassProvider();
skyFunctions.put(SkyFunctions.WORKSPACE_AST, new WorkspaceASTFunction(ruleClassProvider));
skyFunctions.put(
@@ -238,13 +237,12 @@
}
@Test
- public void testBlacklistedPackage() throws Exception {
- scratch.file("blacklisted/subdir/BUILD");
- scratch.file("blacklisted/BUILD");
- Path blacklist =
- scratch.overwriteFile(BLACKLISTED_PACKAGE_PREFIXES_FILE_PATH_STRING, "blacklisted");
+ public void testIgnoredPackage() throws Exception {
+ scratch.file("ignored/subdir/BUILD");
+ scratch.file("ignored/BUILD");
+ Path ignored = scratch.overwriteFile(IGNORED_PACKAGE_PREFIXES_FILE_PATH_STRING, "ignored");
- ImmutableSet<String> pkgs = ImmutableSet.of("blacklisted/subdir", "blacklisted");
+ ImmutableSet<String> pkgs = ImmutableSet.of("ignored/subdir", "ignored");
for (String pkg : pkgs) {
PackageLookupValue packageLookupValue = lookupPackage(pkg);
assertThat(packageLookupValue.packageExists()).isFalse();
@@ -252,12 +250,12 @@
assertThat(packageLookupValue.getErrorMsg()).isNotNull();
}
- scratch.overwriteFile(BLACKLISTED_PACKAGE_PREFIXES_FILE_PATH_STRING, "not_blacklisted");
- RootedPath rootedBlacklist =
+ scratch.overwriteFile(IGNORED_PACKAGE_PREFIXES_FILE_PATH_STRING, "not_ignored");
+ RootedPath rootedIgnoreFile =
RootedPath.toRootedPath(
- Root.fromPath(blacklist.getParentDirectory().getParentDirectory()),
- PathFragment.create("config/blacklisted.txt"));
- differencer.invalidate(ImmutableSet.of(FileStateValue.key(rootedBlacklist)));
+ Root.fromPath(ignored.getParentDirectory().getParentDirectory()),
+ PathFragment.create("config/ignored.txt"));
+ differencer.invalidate(ImmutableSet.of(FileStateValue.key(rootedIgnoreFile)));
for (String pkg : pkgs) {
PackageLookupValue packageLookupValue = lookupPackage(pkg);
assertThat(packageLookupValue.packageExists()).isTrue();