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
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 804171d..5abc3c3 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 @@
* 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 @@
return new SymlinkFileValue(realRootedPath, realFileStateValue,
fileStateValue.getSymlinkTarget());
} else {
- return new DifferentRealPathFileValue(realRootedPath, realFileStateValue);
+ return new DifferentRealPathFileValue(
+ realRootedPath, realFileStateValue);
}
}
}
@@ -201,7 +202,7 @@
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 @@
private final PathFragment linkValue;
public SymlinkFileValue(RootedPath realRootedPath, FileStateValue realFileState,
- PathFragment linkTarget) {
+ PathFragment linkTarget) {
super(realRootedPath, realFileState);
this.linkValue = linkTarget;
}
@@ -276,7 +277,8 @@
@Override
public int hashCode() {
- return Objects.hash(realRootedPath, realFileStateValue, linkValue, Boolean.TRUE);
+ return Objects.hash(
+ realRootedPath, realFileStateValue, linkValue, Boolean.TRUE);
}
@Override