Skip to content

Commit

Permalink
Check that all entries for previously registered new deps are in the …
Browse files Browse the repository at this point in the history
…graph.

PiperOrigin-RevId: 230345568
  • Loading branch information
janakdr authored and Copybara-Service committed Jan 22, 2019
1 parent b51dd37 commit c612d05
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -821,8 +821,18 @@ private boolean maybeHandleRegisteringNewlyDiscoveredDepsForDoneEntry(
// removeUndoneNewlyRequestedDeps() just above this loop. However, with intra-evaluation
// dirtying, a dep may not be done.
boolean dirtyDepFound = false;
for (Map.Entry<SkyKey, ? extends NodeEntry> newDep :
graph.getBatch(skyKey, Reason.SIGNAL_DEP, previouslyRegisteredNewDeps).entrySet()) {
Map<SkyKey, ? extends NodeEntry> previouslyRegisteredEntries =
graph.getBatch(skyKey, Reason.SIGNAL_DEP, previouslyRegisteredNewDeps);
if (previouslyRegisteredEntries.size() != previouslyRegisteredNewDeps.size()) {
throw new IllegalStateException(
"Missing entries that were already known about: "
+ Sets.difference(previouslyRegisteredNewDeps, previouslyRegisteredEntries.keySet())
+ " for "
+ skyKey
+ " with entry "
+ entry);
}
for (Map.Entry<SkyKey, ? extends NodeEntry> newDep : previouslyRegisteredEntries.entrySet()) {
DependencyState triState = newDep.getValue().checkIfDoneForDirtyReverseDep(skyKey);
if (maybeHandleUndoneDepForDoneEntry(entry, triState, skyKey, newDep.getKey())) {
dirtyDepFound = true;
Expand Down

0 comments on commit c612d05

Please sign in to comment.