Include residue in the explicit command line hash.
@@ -383,6 +383,9 @@ public abstract class CommandLineEvent implements BuildEventWithOrderConstraint
.build();
}
+ /**
+ * Hash including the explicit command line options as well as the residue, e.g. the targets.
+ */
public long getExplicitCommandLineHash() {
long hash = 0;
for (Entry<String, Object> starlarkOption : commandOptions.getStarlarkOptions().entrySet()) {
@@ -397,6 +400,9 @@ public abstract class CommandLineEvent implements BuildEventWithOrderConstraint
}
hash = hash * 31 + canonicalOptionDesc.getCanonicalForm().hashCode();
}
+ for (String r : commandOptions.getResidue()) {
+ hash = hash * 31 + r.hashCode();
+ }
return hash;
}
