diff options
author | 2016-08-25 09:07:36 +0000 | |
---|---|---|
committer | 2016-08-25 20:17:33 +0000 | |
commit | 0352a590b806e23859857607a5981ec7d4bdacff (patch) | |
tree | 1c5eb5c6a2ec17ff25995367fc7c0b7a5867ed90 /src/main/java/com/google/devtools/build/lib/actions/MutableActionGraph.java | |
parent | 2c5411c3726be3574d822a14505292cc6da12def (diff) |
Add information about the key of conflicting actions to the error message in an effort to track down a spurious ActionConflictException.
--
MOS_MIGRATED_REVID=131265803
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/actions/MutableActionGraph.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/actions/MutableActionGraph.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/MutableActionGraph.java b/src/main/java/com/google/devtools/build/lib/actions/MutableActionGraph.java index 637442dd4c..6eae2a3b67 100644 --- a/src/main/java/com/google/devtools/build/lib/actions/MutableActionGraph.java +++ b/src/main/java/com/google/devtools/build/lib/actions/MutableActionGraph.java @@ -143,6 +143,12 @@ public interface MutableActionGraph extends ActionGraph { } } + private static String getKey(ActionAnalysisMetadata action) { + return action instanceof Action + ? ((Action) action).getKey() + : null; + } + // See also Actions.canBeShared() private static String suffix(ActionAnalysisMetadata a, ActionAnalysisMetadata b) { // Note: the error message reveals to users the names of intermediate files that are not @@ -161,6 +167,7 @@ public interface MutableActionGraph extends ActionGraph { addStringDetail(sb, "Configuration", aNull ? null : aOwner.getConfigurationChecksum(), bNull ? null : bOwner.getConfigurationChecksum()); addStringDetail(sb, "Mnemonic", a.getMnemonic(), b.getMnemonic()); + addStringDetail(sb, "Action key", getKey(a), getKey(b)); if ((a instanceof ActionExecutionMetadata) && (b instanceof ActionExecutionMetadata)) { addStringDetail( @@ -187,7 +194,7 @@ public interface MutableActionGraph extends ActionGraph { && bPrimaryInput != null && aPrimaryInput.toString().equals(bPrimaryInput.toString()))) { if (aPrimaryInput != bPrimaryInput) { - sb.append("Primary outputs are different objects: ") + sb.append("Primary inputs are different objects: ") .append(System.identityHashCode(aPrimaryInput)) .append(", ") .append(System.identityHashCode(bPrimaryInput)) |