Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: spill module mapping args to a file #2644

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 3, 2025

Conversation

mattem
Copy link
Contributor

@mattem mattem commented Mar 2, 2025

Calls to the modules mapping rule contains very long command line args due to the use of the full wheels parameter. This change adds support for spilling the args into a file as needed.

In addition, it improves the performance of the modules_mapping rule:

  • Remove the calls to_list that are unnecessary on the depset.
  • Remove the iteration over the depset when passing to args, and other calls to .path, and instead let args do this lazily.

@mattem mattem force-pushed the modules_mapping_perf branch 2 times, most recently from d69abcd to 17313cc Compare March 2, 2025 02:55
Copy link
Collaborator

@aignas aignas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general LGTM, but would love to have some explanation of how things are wired. It took me a few minutes to look at it and google official docs to understand how it is actually wired.

@mattem mattem force-pushed the modules_mapping_perf branch from 17313cc to 3919282 Compare March 3, 2025 12:40
@mattem mattem force-pushed the modules_mapping_perf branch from 3919282 to 15b5cce Compare March 3, 2025 12:51
@mattem mattem requested a review from aignas March 3, 2025 12:51
Copy link
Collaborator

@aignas aignas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you.

@aignas aignas added this pull request to the merge queue Mar 3, 2025
Merged via the queue into bazel-contrib:main with commit f4fde65 Mar 3, 2025
4 checks passed
dcode pushed a commit to dcode/rules_python that referenced this pull request Mar 3, 2025
Calls to the modules mapping rule contains very long command line args
due to the use of the full `wheels` parameter. This change adds support
for spilling the args into a file as needed.

In addition, it improves the performance of the `modules_mapping` rule:

* Remove the calls `to_list` that are unnecessary on the depset.
* Remove the iteration over the depset when passing to `args`, and other
calls to `.path`, and instead let args do this lazily.
@mattem mattem deleted the modules_mapping_perf branch April 5, 2025 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants