Skip to content

Commit d64d618

Browse files
committed
refactor: remove create_executable_result_struct helper
1 parent 5fe50fb commit d64d618

2 files changed

Lines changed: 6 additions & 23 deletions

File tree

python/private/common.bzl

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -109,27 +109,6 @@ def create_cc_details_struct(
109109
**kwargs
110110
)
111111

112-
def create_executable_result_struct(*, extra_files_to_build, output_groups, extra_runfiles = None):
113-
"""Creates a `CreateExecutableResult` struct.
114-
115-
This is the return value type of the semantics create_executable function.
116-
117-
Args:
118-
extra_files_to_build: depset of File; additional files that should be
119-
included as default outputs.
120-
output_groups: dict[str, depset[File]]; additional output groups that
121-
should be returned.
122-
extra_runfiles: A runfiles object of additional runfiles to include.
123-
124-
Returns:
125-
A `CreateExecutableResult` struct.
126-
"""
127-
return struct(
128-
extra_files_to_build = extra_files_to_build,
129-
output_groups = output_groups,
130-
extra_runfiles = extra_runfiles,
131-
)
132-
133112
def csv(values):
134113
"""Convert a list of strings to comma separated value string."""
135114
return ", ".join(sorted(values))

python/private/py_executable.bzl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ load(
4242
"collect_runfiles",
4343
"create_binary_semantics_struct",
4444
"create_cc_details_struct",
45-
"create_executable_result_struct",
4645
"create_instrumented_files_info",
4746
"create_output_group_info",
4847
"create_py_info",
@@ -459,9 +458,14 @@ def _create_executable(
459458
# added to the zipped files.
460459
if venv and venv.interpreter:
461460
extra_runfiles = extra_runfiles.merge(ctx.runfiles([venv.interpreter]))
462-
return create_executable_result_struct(
461+
return struct(
462+
# depset[File] of additional files that should be included as default
463+
# outputs.
463464
extra_files_to_build = depset(extra_files_to_build),
465+
# dict[str, depset[File]]; additional output groups that should be
466+
# returned.
464467
output_groups = {"python_zip_file": depset([zip_file])},
468+
# runfiles; additional runfiles to include.
465469
extra_runfiles = extra_runfiles,
466470
)
467471

0 commit comments

Comments
 (0)