Skip to content

Commit

Permalink
Extend proto_common.compile with experimental_exec_group argument
Browse files Browse the repository at this point in the history
This makes it possible to run proto_compiler on a special execution group.

The parameter is experimental, because there might be other better options how to do this.

PiperOrigin-RevId: 480334847
Change-Id: Idfd3d6b0e6c14fb9ecfb4f117f17d424c2f5d625
  • Loading branch information
comius authored and pull[bot] committed Aug 3, 2023
1 parent e57fcfb commit 62908d2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/starlark/builtins_bzl/common/proto/proto_common.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def _compile(
additional_tools = [],
additional_inputs = depset(),
resource_set = None,
experimental_exec_group = None,
experimental_progress_message = None):
"""Creates proto compile action for compiling *.proto files to language specific sources.
Expand All @@ -68,7 +69,9 @@ def _compile(
resource_set: (func) A callback function that is passed to the created action.
See `ctx.actions.run`, `resource_set` parameter for full definition of
the callback.
experimental_progress_message: Overrides progres_message from the toolchain.
experimental_exec_group: (str) Sets `exec_group` on proto compile action.
Avoid using this parameter.
experimental_progress_message: Overrides progress_message from the toolchain.
Don't use this parameter. It's only intended for the transition.
"""
args = actions.args()
Expand Down Expand Up @@ -110,6 +113,7 @@ def _compile(
tools = tools,
use_default_shell_env = True,
resource_set = resource_set,
exec_group = experimental_exec_group,
)

_BAZEL_TOOLS_PREFIX = "external/bazel_tools/"
Expand Down

0 comments on commit 62908d2

Please sign in to comment.