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/main/java/com/google/devtools/build/lib/cmdline/TargetPattern.java b/src/main/java/com/google/devtools/build/lib/cmdline/TargetPattern.java
index 15054a9..178286f 100644
--- a/src/main/java/com/google/devtools/build/lib/cmdline/TargetPattern.java
+++ b/src/main/java/com/google/devtools/build/lib/cmdline/TargetPattern.java
@@ -147,37 +147,37 @@
}
/**
- * Evaluates the current target pattern, excluding targets under directories in both
- * {@code blacklistedSubdirectories} and {@code excludedSubdirectories}, and returns the result.
+ * Evaluates the current target pattern, excluding targets under directories in both {@code
+ * ignoredSubdirectories} and {@code excludedSubdirectories}, and returns the result.
*
- * @throws IllegalArgumentException if either {@code blacklistedSubdirectories} or
- * {@code excludedSubdirectories} is nonempty and this pattern does not have type
- * {@code Type.TARGETS_BELOW_DIRECTORY}.
+ * @throws IllegalArgumentException if either {@code ignoredSubdirectories} or {@code
+ * excludedSubdirectories} is nonempty and this pattern does not have type {@code
+ * Type.TARGETS_BELOW_DIRECTORY}.
*/
public abstract <T, E extends Exception> void eval(
TargetPatternResolver<T> resolver,
- ImmutableSet<PathFragment> blacklistedSubdirectories,
+ ImmutableSet<PathFragment> ignoredSubdirectories,
ImmutableSet<PathFragment> excludedSubdirectories,
BatchCallback<T, E> callback,
Class<E> exceptionClass)
throws TargetParsingException, E, InterruptedException;
/**
- * Evaluates this {@link TargetPattern} synchronously, feeding the result to the given
- * {@code callback}, and then returns an appropriate immediate {@link ListenableFuture}.
+ * Evaluates this {@link TargetPattern} synchronously, feeding the result to the given {@code
+ * callback}, and then returns an appropriate immediate {@link ListenableFuture}.
*
- * <p>If the returned {@link ListenableFuture}'s {@link ListenableFuture#get} throws an
- * {@link ExecutionException}, the cause will be an instance of either
- * {@link TargetParsingException} or the given {@code exceptionClass}.
+ * <p>If the returned {@link ListenableFuture}'s {@link ListenableFuture#get} throws an {@link
+ * ExecutionException}, the cause will be an instance of either {@link TargetParsingException} or
+ * the given {@code exceptionClass}.
*/
public final <T, E extends Exception> ListenableFuture<Void> evalAdaptedForAsync(
TargetPatternResolver<T> resolver,
- ImmutableSet<PathFragment> blacklistedSubdirectories,
+ ImmutableSet<PathFragment> ignoredSubdirectories,
ImmutableSet<PathFragment> excludedSubdirectories,
ThreadSafeBatchCallback<T, E> callback,
Class<E> exceptionClass) {
try {
- eval(resolver, blacklistedSubdirectories, excludedSubdirectories, callback, exceptionClass);
+ eval(resolver, ignoredSubdirectories, excludedSubdirectories, callback, exceptionClass);
return Futures.immediateFuture(null);
} catch (TargetParsingException e) {
return Futures.immediateFailedFuture(e);
@@ -192,22 +192,22 @@
}
/**
- * Returns a {@link ListenableFuture} representing the asynchronous evaluation of this
- * {@link TargetPattern} that feeds the results to the given {@code callback}.
+ * Returns a {@link ListenableFuture} representing the asynchronous evaluation of this {@link
+ * TargetPattern} that feeds the results to the given {@code callback}.
*
- * <p>If the returned {@link ListenableFuture}'s {@link ListenableFuture#get} throws an
- * {@link ExecutionException}, the cause will be an instance of either
- * {@link TargetParsingException} or the given {@code exceptionClass}.
+ * <p>If the returned {@link ListenableFuture}'s {@link ListenableFuture#get} throws an {@link
+ * ExecutionException}, the cause will be an instance of either {@link TargetParsingException} or
+ * the given {@code exceptionClass}.
*/
public <T, E extends Exception> ListenableFuture<Void> evalAsync(
TargetPatternResolver<T> resolver,
- ImmutableSet<PathFragment> blacklistedSubdirectories,
+ ImmutableSet<PathFragment> ignoredSubdirectories,
ImmutableSet<PathFragment> excludedSubdirectories,
ThreadSafeBatchCallback<T, E> callback,
Class<E> exceptionClass,
ListeningExecutorService executor) {
return evalAdaptedForAsync(
- resolver, blacklistedSubdirectories, excludedSubdirectories, callback, exceptionClass);
+ resolver, ignoredSubdirectories, excludedSubdirectories, callback, exceptionClass);
}
/**
@@ -325,10 +325,11 @@
@Override
public <T, E extends Exception> void eval(
TargetPatternResolver<T> resolver,
- ImmutableSet<PathFragment> blacklistedSubdirectories,
+ ImmutableSet<PathFragment> ignoredSubdirectories,
ImmutableSet<PathFragment> excludedSubdirectories,
BatchCallback<T, E> callback,
- Class<E> exceptionClass) throws TargetParsingException, E, InterruptedException {
+ Class<E> exceptionClass)
+ throws TargetParsingException, E, InterruptedException {
callback.process(resolver.getExplicitTarget(label(targetName)).getTargets());
}
@@ -387,9 +388,10 @@
@Override
public <T, E extends Exception> void eval(
TargetPatternResolver<T> resolver,
- ImmutableSet<PathFragment> blacklistedSubdirectories,
+ ImmutableSet<PathFragment> ignoredSubdirectories,
ImmutableSet<PathFragment> excludedSubdirectories,
- BatchCallback<T, E> callback, Class<E> exceptionClass)
+ BatchCallback<T, E> callback,
+ Class<E> exceptionClass)
throws TargetParsingException, E, InterruptedException {
if (resolver.isPackage(PackageIdentifier.createInMainRepo(path))) {
// User has specified a package name. lookout for default target.
@@ -479,9 +481,10 @@
@Override
public <T, E extends Exception> void eval(
TargetPatternResolver<T> resolver,
- ImmutableSet<PathFragment> blacklistedSubdirectories,
+ ImmutableSet<PathFragment> ignoredSubdirectories,
ImmutableSet<PathFragment> excludedSubdirectories,
- BatchCallback<T, E> callback, Class<E> exceptionClass)
+ BatchCallback<T, E> callback,
+ Class<E> exceptionClass)
throws TargetParsingException, E, InterruptedException {
if (checkWildcardConflict) {
ResolvedTargets<T> targets = getWildcardConflict(resolver);
@@ -591,7 +594,7 @@
@Override
public <T, E extends Exception> void eval(
TargetPatternResolver<T> resolver,
- ImmutableSet<PathFragment> blacklistedSubdirectories,
+ ImmutableSet<PathFragment> ignoredSubdirectories,
ImmutableSet<PathFragment> excludedSubdirectories,
BatchCallback<T, E> callback,
Class<E> exceptionClass)
@@ -601,7 +604,7 @@
getOriginalPattern(),
directory.getPackageFragment().getPathString(),
rulesOnly,
- blacklistedSubdirectories,
+ ignoredSubdirectories,
excludedSubdirectories,
callback,
exceptionClass);
@@ -610,7 +613,7 @@
@Override
public <T, E extends Exception> ListenableFuture<Void> evalAsync(
TargetPatternResolver<T> resolver,
- ImmutableSet<PathFragment> blacklistedSubdirectories,
+ ImmutableSet<PathFragment> ignoredSubdirectories,
ImmutableSet<PathFragment> excludedSubdirectories,
ThreadSafeBatchCallback<T, E> callback,
Class<E> exceptionClass,
@@ -620,7 +623,7 @@
getOriginalPattern(),
directory.getPackageFragment().getPathString(),
rulesOnly,
- blacklistedSubdirectories,
+ ignoredSubdirectories,
excludedSubdirectories,
callback,
exceptionClass,