aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/genquery
diff options
context:
space:
mode:
authorGravatar nharmata <nharmata@google.com>2017-06-21 23:12:51 +0200
committerGravatar Philipp Wollermann <philwo@google.com>2017-06-22 12:41:41 +0200
commitbf2e2d8003a2418941404741fce82f1e51b3b28b (patch)
tree635b390996de6d1d8207ee0f923e00b31646aa0e /src/main/java/com/google/devtools/build/lib/rules/genquery
parentaade4f64350a7817e452225733ae98cf19c63a69 (diff)
In the Blaze Query implementation, use Set and Map implementations backed by the same KeyExtractor used that the Uniquifier implementation uses. This fixes a hypothetical issue where we were previously relying on Target#equals/hashCode.
RELNOTES: None PiperOrigin-RevId: 159741545
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/genquery')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/genquery/GenQuery.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/genquery/GenQuery.java b/src/main/java/com/google/devtools/build/lib/rules/genquery/GenQuery.java
index f5abf25019..fbd0943744 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/genquery/GenQuery.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/genquery/GenQuery.java
@@ -284,8 +284,7 @@ public class GenQuery implements RuleConfiguredTargetFactory {
DigraphQueryEvalResult<Target> queryResult;
OutputFormatter formatter;
- AggregateAllOutputFormatterCallback<Target> targets =
- QueryUtil.newOrderedAggregateAllOutputFormatterCallback();
+ AggregateAllOutputFormatterCallback<Target, ?> targets;
try {
Set<Setting> settings = queryOptions.toSettings();
@@ -327,6 +326,7 @@ public class GenQuery implements RuleConfiguredTargetFactory {
/*blockUniverseEvaluationErrors=*/ false);
QueryExpression expr = QueryExpression.parse(query, queryEnvironment);
formatter.verifyCompatible(queryEnvironment, expr);
+ targets = QueryUtil.newOrderedAggregateAllOutputFormatterCallback(queryEnvironment);
queryResult = queryEnvironment.evaluateQuery(expr, targets);
} catch (SkyframeRestartQueryException e) {
// Do not emit errors for skyframe restarts. They make output of the ConfiguredTargetFunction