aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/pkgcache
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/pkgcache
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/pkgcache')
-rw-r--r--src/main/java/com/google/devtools/build/lib/pkgcache/TargetPatternEvaluator.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/pkgcache/TargetPatternEvaluator.java b/src/main/java/com/google/devtools/build/lib/pkgcache/TargetPatternEvaluator.java
index 94e956b435..7732519404 100644
--- a/src/main/java/com/google/devtools/build/lib/pkgcache/TargetPatternEvaluator.java
+++ b/src/main/java/com/google/devtools/build/lib/pkgcache/TargetPatternEvaluator.java
@@ -43,6 +43,8 @@ import java.util.Map;
*/
@ThreadSafety.ConditionallyThreadSafe // as long as you don't call updateOffset.
public interface TargetPatternEvaluator {
+ static FilteringPolicy DEFAULT_FILTERING_POLICY = FilteringPolicies.NO_FILTER;
+
/**
* Attempts to parse an ordered list of target patterns, computing the union
* of the set of targets represented by each pattern, unless it is preceded by
@@ -78,7 +80,6 @@ public interface TargetPatternEvaluator {
Collection<String> patterns, boolean keepGoing)
throws TargetParsingException, InterruptedException;
-
/**
* Update the parser's offset, given the workspace and working directory.
*