Skip to content

Commit

Permalink
Get rid of NO_NODEP_DEP filtering in genquery because it already happ…
Browse files Browse the repository at this point in the history
…ens.

PiperOrigin-RevId: 229805751
  • Loading branch information
juliexxia authored and weixiao-huang committed Jan 31, 2019
1 parent 4428c70 commit 503cdb0
Showing 1 changed file with 1 addition and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
import com.google.devtools.build.lib.query2.QueryEnvironmentFactory;
import com.google.devtools.build.lib.query2.engine.DigraphQueryEvalResult;
import com.google.devtools.build.lib.query2.engine.QueryEnvironment.QueryFunction;
import com.google.devtools.build.lib.query2.engine.QueryEnvironment.Setting;
import com.google.devtools.build.lib.query2.engine.QueryException;
import com.google.devtools.build.lib.query2.engine.QueryExpression;
import com.google.devtools.build.lib.query2.engine.QueryUtil;
Expand Down Expand Up @@ -287,16 +286,6 @@ private ByteString doQuery(
OutputFormatter formatter;
AggregateAllOutputFormatterCallback<Target, ?> targets;
try {
Set<Setting> settings = queryOptions.toSettings();

// Turns out, if we have two targets with a cycle of length 2 were one of
// the edges is of type NODEP_LABEL type, the targets both show up in
// each other's result for deps(X) when the query is executed using
// 'blaze query'. This obviously does not fly when doing the query as a
// part of the build, thus, there is a slight discrepancy between the
// behavior of the query engine in these two use cases.
settings.add(Setting.NO_NODEP_DEPS);

formatter =
OutputFormatter.getFormatter(
OutputFormatter.getDefaultFormatters(), queryOptions.outputFormat);
Expand Down Expand Up @@ -327,7 +316,7 @@ private ByteString doQuery(
/*loadingPhaseThreads=*/ 4,
labelFilter,
getEventHandler(ruleContext),
settings,
queryOptions.toSettings(),
ImmutableList.<QueryFunction>of(),
/*packagePath=*/ null,
/*blockUniverseEvaluationErrors=*/ false);
Expand Down

0 comments on commit 503cdb0

Please sign in to comment.