aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/DirectoryListingStateFunction.java
diff options
context:
space:
mode:
authorGravatar Nathan Harmata <nharmata@google.com>2016-10-14 22:38:17 +0000
committerGravatar Philipp Wollermann <philwo@google.com>2016-10-17 11:19:17 +0000
commitb776d6c12e952eb358c1a036cc9d93d8944c4c77 (patch)
tree0f0381870fddf2bae3d63e48af61c1e69592b6e0 /src/main/java/com/google/devtools/build/lib/skyframe/DirectoryListingStateFunction.java
parent29cc0d9c54ec8d4b80d63824783ba3da2abed1a6 (diff)
*** Reason for rollback *** [] *** Original change description *** Slight refactor of ExternalFilesHelper: -Make FileType and ExternalFileAction public. -Have producers use ExternalFileAction, rather than a boolean, to specify the desired behavior. And a big change in semantics (doesn't affect Bazel): -Replace ExternalFileAction.ERROR_OUT with ExternalFileAction.ASSUME_NON_EXISTENT_AND_IMMUTABLE, which does what it sounds like. This new action, like the old ERROR_OUT, is _not_ used in Bazel. -- MOS_MIGRATED_REVID=136206810
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/DirectoryListingStateFunction.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/DirectoryListingStateFunction.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/DirectoryListingStateFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/DirectoryListingStateFunction.java
index 307c74b22a..aa1fe760e2 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/DirectoryListingStateFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/DirectoryListingStateFunction.java
@@ -45,10 +45,8 @@ public class DirectoryListingStateFunction implements SkyFunction {
return null;
}
return DirectoryListingStateValue.create(dirRootedPath);
- } catch (ExternalFilesHelper.NonexistentImmutableExternalFileException e) {
- // DirectoryListingStateValue.key assumes the path exists. This exception here is therefore
- // indicative of a programming bug.
- throw new IllegalStateException(dirRootedPath.toString(), e);
+ } catch (FileOutsidePackageRootsException e) {
+ throw new DirectoryListingStateFunctionException(e);
} catch (IOException e) {
throw new DirectoryListingStateFunctionException(e);
}
@@ -68,5 +66,9 @@ public class DirectoryListingStateFunction implements SkyFunction {
public DirectoryListingStateFunctionException(IOException e) {
super(e, Transience.TRANSIENT);
}
+
+ public DirectoryListingStateFunctionException(FileOutsidePackageRootsException e) {
+ super(e, Transience.PERSISTENT);
+ }
}
}