diff options
author | 2016-03-02 01:16:14 +0000 | |
---|---|---|
committer | 2016-03-02 17:54:51 +0000 | |
commit | ed93560c70d2a43463fb6364152e8a40b67ca7ec (patch) | |
tree | 7b42b4985eecc8646279bf91eb4b648d40f9dcfa /src/main/java/com/google/devtools/build/lib/runtime/commands | |
parent | 985ed7072fe3d94a78895a61760313be02df79d8 (diff) |
In SkyQueryEnvironment, rewrite queries using the semantics-preserving transformation 'rdeps(<sky_query_environment_universe_scope>, T, depth)' -> 'allrdeps(T, depth)'.
SkyQueryEnvironment can evaluate such allrdeps queries much more efficiently since it doesn't need to bother filtering out targets outside of universe, meaning it doesn't need to have all targets in the universe in memory at the same time.
--
MOS_MIGRATED_REVID=116075008
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime/commands')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/runtime/commands/QueryCommand.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/commands/QueryCommand.java b/src/main/java/com/google/devtools/build/lib/runtime/commands/QueryCommand.java index 45a76e5ed9..32159f413a 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/commands/QueryCommand.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/commands/QueryCommand.java @@ -138,7 +138,7 @@ public final class QueryCommand implements BlazeCommand { queryOptions.universeScope, queryOptions.loadingPhaseThreads, settings); - // 1. Parse query: + // 1. Parse and transform query: QueryExpression expr; try { expr = QueryExpression.parse(query, queryEnv); @@ -147,6 +147,7 @@ public final class QueryCommand implements BlazeCommand { null, "Error while parsing '" + query + "': " + e.getMessage())); return ExitCode.COMMAND_LINE_ERROR; } + expr = queryEnv.transformParsedQuery(expr); QueryEvalResult result; PrintStream output = null; |