From d64d618dd456bc3154a65ff2f4a0079f70cdeff2 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Sat, 24 Jan 2026 08:17:35 -0800 Subject: [PATCH] refactor: remove create_executable_result_struct helper --- python/private/common.bzl | 21 --------------------- python/private/py_executable.bzl | 8 ++++++-- 2 files changed, 6 insertions(+), 23 deletions(-) diff --git a/python/private/common.bzl b/python/private/common.bzl index 2d4afca3f5..527fbc5c7d 100644 --- a/python/private/common.bzl +++ b/python/private/common.bzl @@ -109,27 +109,6 @@ def create_cc_details_struct( **kwargs ) -def create_executable_result_struct(*, extra_files_to_build, output_groups, extra_runfiles = None): - """Creates a `CreateExecutableResult` struct. - - This is the return value type of the semantics create_executable function. - - Args: - extra_files_to_build: depset of File; additional files that should be - included as default outputs. - output_groups: dict[str, depset[File]]; additional output groups that - should be returned. - extra_runfiles: A runfiles object of additional runfiles to include. - - Returns: - A `CreateExecutableResult` struct. - """ - return struct( - extra_files_to_build = extra_files_to_build, - output_groups = output_groups, - extra_runfiles = extra_runfiles, - ) - def csv(values): """Convert a list of strings to comma separated value string.""" return ", ".join(sorted(values)) diff --git a/python/private/py_executable.bzl b/python/private/py_executable.bzl index 5bac6247ef..9d1b74f71d 100644 --- a/python/private/py_executable.bzl +++ b/python/private/py_executable.bzl @@ -42,7 +42,6 @@ load( "collect_runfiles", "create_binary_semantics_struct", "create_cc_details_struct", - "create_executable_result_struct", "create_instrumented_files_info", "create_output_group_info", "create_py_info", @@ -459,9 +458,14 @@ def _create_executable( # added to the zipped files. if venv and venv.interpreter: extra_runfiles = extra_runfiles.merge(ctx.runfiles([venv.interpreter])) - return create_executable_result_struct( + return struct( + # depset[File] of additional files that should be included as default + # outputs. extra_files_to_build = depset(extra_files_to_build), + # dict[str, depset[File]]; additional output groups that should be + # returned. output_groups = {"python_zip_file": depset([zip_file])}, + # runfiles; additional runfiles to include. extra_runfiles = extra_runfiles, )