aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/google/devtools/build')
-rw-r--r--src/main/java/com/google/devtools/build/lib/buildtool/BuildTool.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/buildtool/BuildTool.java b/src/main/java/com/google/devtools/build/lib/buildtool/BuildTool.java
index 7607c16f97..107510fa67 100644
--- a/src/main/java/com/google/devtools/build/lib/buildtool/BuildTool.java
+++ b/src/main/java/com/google/devtools/build/lib/buildtool/BuildTool.java
@@ -64,6 +64,7 @@ import com.google.devtools.build.lib.pkgcache.LoadingResult;
import com.google.devtools.build.lib.profiler.ProfilePhase;
import com.google.devtools.build.lib.profiler.Profiler;
import com.google.devtools.build.lib.query2.ConfiguredTargetQueryEnvironment;
+import com.google.devtools.build.lib.query2.engine.QueryEvalResult;
import com.google.devtools.build.lib.query2.engine.QueryException;
import com.google.devtools.build.lib.query2.engine.TargetLiteral;
import com.google.devtools.build.lib.query2.engine.ThreadSafeOutputFormatterCallback;
@@ -458,7 +459,7 @@ public final class BuildTool {
queryOptions == null
? new HashSet<>()
: ConfiguredTargetQueryEnvironment.parseOptions(queryOptions).toSettings());
- configuredTargetQueryEnvironment.evaluateQuery(
+ QueryEvalResult result = configuredTargetQueryEnvironment.evaluateQuery(
queryExpr,
new ThreadSafeOutputFormatterCallback<ConfiguredTarget>() {
@Override
@@ -475,6 +476,9 @@ public final class BuildTool {
}
}
});
+ if (result.isEmpty()) {
+ env.getReporter().handle(Event.info("Empty query results"));
+ }
}
private void maybeSetStopOnFirstFailure(BuildRequest request, BuildResult result) {