diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/RecursiveDirectoryTraversalFunction.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/RecursiveDirectoryTraversalFunction.java | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/RecursiveDirectoryTraversalFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/RecursiveDirectoryTraversalFunction.java index 4f9fcab1c7..d0c76333f2 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/RecursiveDirectoryTraversalFunction.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/RecursiveDirectoryTraversalFunction.java @@ -163,15 +163,18 @@ abstract class RecursiveDirectoryTraversalFunction return null; } pkg = pkgValue.getPackage(); + if (pkg.containsErrors()) { + env + .getListener() + .handle( + Event.error("package contains errors: " + rootRelativePath.getPathString())); + } } catch (NoSuchPackageException e) { // The package had errors, but don't fail-fast as there might be subpackages below the - // current directory, and there might be targets in the package that were successfully - // loaded. - env.getListener().handle(Event.error( - "package contains errors: " + rootRelativePath.getPathString())); - if (e.getPackage() != null) { - pkg = e.getPackage(); - } + // current directory. + env + .getListener() + .handle(Event.error("package contains errors: " + rootRelativePath.getPathString())); } if (pkg != null) { visitor.visitPackageValue(pkg, env); |