From f00d624ba6b39de6aa0ba5a9626526f239ab413d Mon Sep 17 00:00:00 2001 From: janakr Date: Tue, 6 Mar 2018 14:56:45 -0800 Subject: @AutoCodec File{State}Value. PiperOrigin-RevId: 188085895 --- .../google/devtools/build/lib/skyframe/FileContentsProxy.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/FileContentsProxy.java') diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/FileContentsProxy.java b/src/main/java/com/google/devtools/build/lib/skyframe/FileContentsProxy.java index 8dca37c391..2b845edc38 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/FileContentsProxy.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/FileContentsProxy.java @@ -13,21 +13,23 @@ // limitations under the License. package com.google.devtools.build.lib.skyframe; +import com.google.devtools.build.lib.skyframe.serialization.autocodec.AutoCodec; import com.google.devtools.build.lib.vfs.FileStatus; import java.io.IOException; import java.io.Serializable; import java.util.Objects; /** - * In case we can't get a fast digest from the filesystem, we store this metadata as a proxy to - * the file contents. Currently it is a pair of a relevant timestamp and a "node id". On Linux the - * former is the ctime and the latter is the inode number. We might want to add the device number - * in the future. + * In case we can't get a fast digest from the filesystem, we store this metadata as a proxy to the + * file contents. Currently it is a pair of a relevant timestamp and a "node id". On Linux the + * former is the ctime and the latter is the inode number. We might want to add the device number in + * the future. * *

For a Linux example of why mtime alone is insufficient, note that 'mv' preserves timestamps. * So if files 'a' and 'b' initially have the same timestamp, then we would think 'b' is unchanged * after the user executes `mv a b` between two builds. */ +@AutoCodec public final class FileContentsProxy implements Serializable { private final long ctime; private final long nodeId; -- cgit v1.2.3