aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/skyframe/FileValue.java
diff options
context:
space:
mode:
authorGravatar Kristina Chodorow <kchodorow@google.com>2015-12-08 12:49:31 +0000
committerGravatar Lukacs Berki <lberki@google.com>2015-12-08 13:17:04 +0000
commitf9fdc8dfced8b2b14561720623126a91e04b22cb (patch)
tree3dd323db49d99bcf61bef0cf9abe4b93a8c1f84b /src/main/java/com/google/devtools/build/lib/skyframe/FileValue.java
parent258af7b294706bde162a965390ab39f9917a87b1 (diff)
Don't treat external files as immutable
Fixes #352. RELNOTES: Files in external repositories are now treated as mutable, which will make the correctness guarantees of using external repositories stronger (existent), but may cause performance penalties. -- MOS_MIGRATED_REVID=109676408
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/FileValue.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/FileValue.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/FileValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/FileValue.java
index 804171d0e3..5abc3c318c 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/FileValue.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/FileValue.java
@@ -126,7 +126,7 @@ public abstract class FileValue implements SkyValue {
* Only intended to be used by {@link FileFunction}. Should not be used for symlink cycles.
*/
static FileValue value(RootedPath rootedPath, FileStateValue fileStateValue,
- RootedPath realRootedPath, FileStateValue realFileStateValue) {
+ RootedPath realRootedPath, FileStateValue realFileStateValue) {
if (rootedPath.equals(realRootedPath)) {
Preconditions.checkState(fileStateValue.getType() != FileStateValue.Type.SYMLINK,
"rootedPath: %s, fileStateValue: %s, realRootedPath: %s, realFileStateValue: %s",
@@ -137,7 +137,8 @@ public abstract class FileValue implements SkyValue {
return new SymlinkFileValue(realRootedPath, realFileStateValue,
fileStateValue.getSymlinkTarget());
} else {
- return new DifferentRealPathFileValue(realRootedPath, realFileStateValue);
+ return new DifferentRealPathFileValue(
+ realRootedPath, realFileStateValue);
}
}
}
@@ -201,7 +202,7 @@ public abstract class FileValue implements SkyValue {
protected final FileStateValue realFileStateValue;
public DifferentRealPathFileValue(RootedPath realRootedPath,
- FileStateValue realFileStateValue) {
+ FileStateValue realFileStateValue) {
this.realRootedPath = Preconditions.checkNotNull(realRootedPath);
this.realFileStateValue = Preconditions.checkNotNull(realFileStateValue);
}
@@ -245,7 +246,7 @@ public abstract class FileValue implements SkyValue {
private final PathFragment linkValue;
public SymlinkFileValue(RootedPath realRootedPath, FileStateValue realFileState,
- PathFragment linkTarget) {
+ PathFragment linkTarget) {
super(realRootedPath, realFileState);
this.linkValue = linkTarget;
}
@@ -276,7 +277,8 @@ public abstract class FileValue implements SkyValue {
@Override
public int hashCode() {
- return Objects.hash(realRootedPath, realFileStateValue, linkValue, Boolean.TRUE);
+ return Objects.hash(
+ realRootedPath, realFileStateValue, linkValue, Boolean.TRUE);
}
@Override