diff options
author | 2016-06-22 17:51:05 +0000 | |
---|---|---|
committer | 2016-06-23 11:09:23 +0000 | |
commit | 002250a99fee65354567898269dedca5cfe316e2 (patch) | |
tree | a48a7dbb66ae6c1d5648eed1655eaf0a580e4013 /src/main/java/com/google/devtools/build/lib/skyframe/GraphBackedRecursivePackageProvider.java | |
parent | 137920a5d64a14f95c4b4e2b7fdc2006ba00ab24 (diff) |
Add some logging when Packages are not found in GraphBackedRPP.
--
MOS_MIGRATED_REVID=125582928
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/GraphBackedRecursivePackageProvider.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/GraphBackedRecursivePackageProvider.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/GraphBackedRecursivePackageProvider.java b/src/main/java/com/google/devtools/build/lib/skyframe/GraphBackedRecursivePackageProvider.java index a306f4fe94..c65bc088b8 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/GraphBackedRecursivePackageProvider.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/GraphBackedRecursivePackageProvider.java @@ -19,6 +19,7 @@ import com.google.common.base.Throwables; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Iterables; import com.google.common.collect.Maps; import com.google.common.collect.Sets; import com.google.common.collect.Sets.SetView; @@ -51,6 +52,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.logging.Logger; /** * A {@link RecursivePackageProvider} backed by a {@link WalkableGraph}, used by {@code @@ -64,6 +66,9 @@ public final class GraphBackedRecursivePackageProvider implements RecursivePacka private final PathPackageLocator pkgPath; private final ImmutableList<TargetPatternKey> universeTargetPatternKeys; + private static final Logger LOGGER = Logger + .getLogger(GraphBackedRecursivePackageProvider.class.getName()); + public GraphBackedRecursivePackageProvider(WalkableGraph graph, ImmutableList<TargetPatternKey> universeTargetPatternKeys, PathPackageLocator pkgPath) { @@ -106,6 +111,9 @@ public final class GraphBackedRecursivePackageProvider implements RecursivePacka } SetView<SkyKey> unknownKeys = Sets.difference(pkgKeys, packages.keySet()); + if (!Iterables.isEmpty(unknownKeys)) { + LOGGER.warning("Unable to find " + unknownKeys + " in the batch lookup of " + pkgKeys); + } for (Map.Entry<SkyKey, Exception> missingOrExceptionEntry : graph.getMissingAndExceptions(unknownKeys).entrySet()) { PackageIdentifier pkgIdentifier = @@ -114,7 +122,7 @@ public final class GraphBackedRecursivePackageProvider implements RecursivePacka if (exception == null) { // If the package key does not exist in the graph, then it must not correspond to any // package, because the SkyQuery environment has already loaded the universe. - throw new BuildFileNotFoundException(pkgIdentifier, "BUILD file not found on package path"); + throw new BuildFileNotFoundException(pkgIdentifier, "Package not found"); } Throwables.propagateIfInstanceOf(exception, NoSuchPackageException.class); Throwables.propagate(exception); |