Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ END_UNRELEASED_TEMPLATE
{obj}`--stamp` flag.
* (pypi) Now the RECORD file patches will follow the quoted or unquoted filenames convention
in order to make `pytorch` and friends easier to patch.
* (wheel) `py_wheel` no longer expands the input depset during analysis,
improving analysis performance for targets with large dependency trees.

{#v0-0-0-fixed}
### Fixed
Expand Down
11 changes: 6 additions & 5 deletions python/private/py_wheel.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -344,12 +344,13 @@ def _py_wheel_impl(ctx):
# Currently this is only the description file (if used).
other_inputs = []

# Wrap the inputs into a file to reduce command line length.
# Wrap the inputs into a file to reduce command line length, deferring
# depset expansion to execution time via Args.add_all with map_each.
packageinputfile = ctx.actions.declare_file(ctx.attr.name + "_target_wrapped_inputs.txt")
content = ""
for input_file in inputs_to_package.to_list():
content += _input_file_to_arg(input_file) + "\n"
ctx.actions.write(output = packageinputfile, content = content)
package_args = ctx.actions.args()
package_args.set_param_file_format("multiline")
package_args.add_all(inputs_to_package, map_each = _input_file_to_arg)
ctx.actions.write(output = packageinputfile, content = package_args)
other_inputs.append(packageinputfile)

args = ctx.actions.args()
Expand Down