Skip to content

Commit

Permalink
Expose py extra action registration to Starlark.
Browse files Browse the repository at this point in the history
This is to allow the Starlark implementation to register the extra actions.

Work towards #15897

PiperOrigin-RevId: 480954594
Change-Id: Idd10e1f135211ec163a1a12d65626f4a7f0f7a78
  • Loading branch information
rickeylev authored and Copybara-Service committed Oct 13, 2022
1 parent f4a4708 commit bd7f428
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,13 @@ void addPyExtraActionPseudoAction() {
if (ruleContext.getConfiguration().getActionListeners().isEmpty()) {
return;
}
registerPyExtraActionPseudoAction(ruleContext, dependencyTransitivePythonSources);
}

// Public so that Starlark bindings can access it. Should only be called by PyStarlarkBuiltins.
// TODO(b/253059598): Remove support for this; https://github.com/bazelbuild/bazel/issues/16455
public static void registerPyExtraActionPseudoAction(
RuleContext ruleContext, NestedSet<Artifact> dependencyTransitivePythonSources) {
ruleContext.registerAction(
makePyExtraActionPseudoAction(
ruleContext.getActionOwner(),
Expand Down

0 comments on commit bd7f428

Please sign in to comment.