aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Janak Ramakrishnan <janakr@google.com>2016-06-01 09:24:20 +0000
committerGravatar Dmitry Lomov <dslomov@google.com>2016-06-01 13:31:58 +0000
commit9c9a28ca34e650d2b583ef64e41cf99d5fb5667d (patch)
tree11e5277b01b597ecdcc9e8c66d5dc893dbd0ff8b /src
parent9d6d7ff8d4563176ec7a9aa14f588bbdc4b8b92f (diff)
Clarify that input/output names should be in cache key.
-- MOS_MIGRATED_REVID=123729693
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/google/devtools/build/lib/actions/Action.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/Action.java b/src/main/java/com/google/devtools/build/lib/actions/Action.java
index 85d22ef304..01cf55472f 100644
--- a/src/main/java/com/google/devtools/build/lib/actions/Action.java
+++ b/src/main/java/com/google/devtools/build/lib/actions/Action.java
@@ -62,12 +62,12 @@ import javax.annotation.Nullable;
* but be aware that every time we've done that, it later resulted in expensive debugging
* sessions and bug fixes.
* <li>As much as possible, make the cache key computation obvious - fully hash every field
- * (except inputs and outputs) in the class, and avoid referencing anything that isn't needed
- * for action execution, such as {@link
- * com.google.devtools.build.lib.analysis.config.BuildConfiguration} objects or even fragments
- * thereof; if the action has a command line, err on the side of hashing the entire command
- * line, even if that seems expensive. It's always safe to hash too much - the negative effect
- * on incremental build times is usually negligible.
+ * (except input contents, but including input and output names if they appear in the command
+ * line) in the class, and avoid referencing anything that isn't needed for action execution,
+ * such as {@link com.google.devtools.build.lib.analysis.config.BuildConfiguration} objects or
+ * even fragments thereof; if the action has a command line, err on the side of hashing the
+ * entire command line, even if that seems expensive. It's always safe to hash too much - the
+ * negative effect on incremental build times is usually negligible.
* <li>Add test coverage for the cache key computation; use {@link
* com.google.devtools.build.lib.analysis.util.ActionTester} to generate as many combinations
* of field values as possible; add test coverage every time you add another field.