aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/graph
diff options
context:
space:
mode:
authorGravatar Janak Ramakrishnan <janakr@google.com>2015-02-26 17:09:18 +0000
committerGravatar Han-Wen Nienhuys <hanwen@google.com>2015-02-26 17:09:18 +0000
commite72d5222d47ad7b7857f4a3f4eaa6225f6cc8433 (patch)
tree1bfc8fdc221e9669c4dbf315be6a90eacdf7521e /src/main/java/com/google/devtools/build/lib/graph
parent8f7358a32428a83324195c8783664281ee2fc3b0 (diff)
Add a SkyQueryEnvironment which runs queries by examining the Skyframe graph.
This environment eagerly preloads the transitive closure of a specified query "universe", and so may not be as efficient as the standard query for limited-scope queries. It is activated when the universe is specified and ordered results are not requested (since it is currently unable to order results). Tests were modified/added to exercise this environment where deemed interesting. Some ugly hacks were done to add coverage in AbstractQueryTest and friends, because currently even if the full depot is loaded (using //...), individual target patterns most likely won't be present in the graph. A better way to deal with this situation, suggested by felly, is probably to extract target pattern resolution logic to an auxiliary function so that query is able to resolve target patterns without mutating the graph, and then call into the read-only graph with the resolved patterns. That may be done in a follow-up, in which case the "scope" of every query could be //... . -- MOS_MIGRATED_REVID=87257028
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/graph')
-rw-r--r--src/main/java/com/google/devtools/build/lib/graph/Digraph.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/graph/Digraph.java b/src/main/java/com/google/devtools/build/lib/graph/Digraph.java
index bea2f5aa05..92e973a2e7 100644
--- a/src/main/java/com/google/devtools/build/lib/graph/Digraph.java
+++ b/src/main/java/com/google/devtools/build/lib/graph/Digraph.java
@@ -597,7 +597,7 @@ public final class Digraph<T> implements Cloneable {
* starting node, returns the path from the root of the tree to 'node' as a
* list.
*/
- private static <X> List<X> getPathToTreeNode(Map<X, X> tree, X node) {
+ public static <X> List<X> getPathToTreeNode(Map<X, X> tree, X node) {
List<X> path = new ArrayList<X>();
while (node != null) {
path.add(node);