Skip to content

Commit

Permalink
Don't add discovered headers to an action's inputs. We already have a…
Browse files Browse the repository at this point in the history
… scheduling

dependency through a middleman and are still returning them from discoverInputs()
to properly declare Skyframe deps for invalidation. Without this change, the
current attempt to clearAdditionalInputs() is not helpful as a reference to the
created list of additional inputs is retained.

PiperOrigin-RevId: 344960874
  • Loading branch information
djasper authored and copybara-github committed Dec 1, 2020
1 parent dc9e15d commit 12b655b
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -583,13 +583,10 @@ public NestedSet<Artifact> discoverInputs(ActionExecutionContext actionExecution
}
topLevelModules = topLevelModulesBuilder.build();
discoveredModulesBuilder.addTransitive(topLevelModules);
NestedSet<Artifact> discoveredModules = discoveredModulesBuilder.buildInterruptibly();
discoveredModules = discoveredModulesBuilder.buildInterruptibly();

additionalInputs =
NestedSetBuilder.fromNestedSet(additionalInputs).addTransitive(discoveredModules).build();
if (outputFile.isFileType(CppFileTypes.CPP_MODULE)) {
this.discoveredModules = discoveredModules;
}
usedModules = null;
return additionalInputs;
}
Expand Down Expand Up @@ -1381,7 +1378,10 @@ public ActionContinuationOrResult beginExecution(ActionExecutionContext actionEx
}

if (shouldScanIncludes) {
updateActionInputs(additionalInputs);
updateActionInputs(discoveredModules);
}
if (!outputFile.isFileType(CppFileTypes.CPP_MODULE)) {
this.discoveredModules = null;
}

ActionExecutionContext spawnContext;
Expand Down

0 comments on commit 12b655b

Please sign in to comment.