aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/GlobValue.java
diff options
context:
space:
mode:
authorGravatar Janak Ramakrishnan <janakr@google.com>2015-05-14 19:38:12 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2015-05-15 09:44:58 +0000
commit29c5ab46fd9eae927b0734ac142ee9ae1c9c00a1 (patch)
tree35a079778e7d58a3ae996c44ff5dc8ac8067f713 /src/main/java/com/google/devtools/build/lib/skyframe/GlobValue.java
parenta689f2900911039d2c10e6de7d41fbf1bdf31f44 (diff)
Allow globs to be used outside of the skyframe package.
-- MOS_MIGRATED_REVID=93647914
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/GlobValue.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/GlobValue.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/GlobValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/GlobValue.java
index 6de0fbdbc6..c93370c317 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/GlobValue.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/GlobValue.java
@@ -25,12 +25,10 @@ import com.google.devtools.build.lib.vfs.UnixGlob;
import com.google.devtools.build.skyframe.SkyKey;
import com.google.devtools.build.skyframe.SkyValue;
-/**
- * A value corresponding to a glob.
- */
+/** A value corresponding to a glob. */
@Immutable
@ThreadSafe
-final class GlobValue implements SkyValue {
+public final class GlobValue implements SkyValue {
static final GlobValue EMPTY = new GlobValue(
NestedSetBuilder.<PathFragment>emptySet(Order.STABLE_ORDER));
@@ -44,7 +42,7 @@ final class GlobValue implements SkyValue {
/**
* Returns glob matches.
*/
- NestedSet<PathFragment> getMatches() {
+ public NestedSet<PathFragment> getMatches() {
return matches;
}
@@ -75,7 +73,8 @@ final class GlobValue implements SkyValue {
* @throws InvalidGlobPatternException if the pattern is not valid.
*/
@ThreadSafe
- static SkyKey key(PackageIdentifier packageId, String pattern, boolean excludeDirs)
+ public static SkyKey key(PackageIdentifier packageId, String pattern, boolean excludeDirs,
+ PathFragment subdir)
throws InvalidGlobPatternException {
if (pattern.indexOf('?') != -1) {
throw new InvalidGlobPatternException(pattern, "wildcard ? forbidden");
@@ -86,7 +85,7 @@ final class GlobValue implements SkyValue {
throw new InvalidGlobPatternException(pattern, error);
}
- return internalKey(packageId, PathFragment.EMPTY_FRAGMENT, pattern, excludeDirs);
+ return internalKey(packageId, subdir, pattern, excludeDirs);
}
/**
@@ -116,7 +115,7 @@ final class GlobValue implements SkyValue {
* An exception that indicates that a glob pattern is syntactically invalid.
*/
@ThreadSafe
- static final class InvalidGlobPatternException extends Exception {
+ public static final class InvalidGlobPatternException extends Exception {
private final String pattern;
InvalidGlobPatternException(String pattern, String error) {