Skip to content

fix java.io.IOException: ... Argument list too long during pex generation. #543

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

phoenixuprising
Copy link

In certain circumstance, a large number of --source args are passed to the _pex script which causes an IOException to be thrown by bazel. This refactors the rule to write the args to a file and pass that single path as an arg to the _pex script. The script then opens that file and feeds it into the arg parser instead.

fixes #542


Test plan

  • Covered by existing test cases - py/tests/py-pex-binary
  • I also tested it with my project that I originally found the bug in.

…ng` during pex generation.

In certain circumstance, a large number of `--source` args are passed to
the `_pex` script which causes an IOException to be thrown by bazel.
This refactors the rule to write the args to a file and pass that single
path as an arg to the `_pex` script. The script then opens that file and
feeds it into the arg parser instead.

fixes aspect-build#542
@CLAassistant
Copy link

CLAassistant commented Mar 29, 2025

CLA assistant check
All committers have signed the CLA.

Copy link

aspect-workflows bot commented Mar 29, 2025

Test

All tests were cache hits

30 tests (100.0%) were fully cached saving 1m 14s.

@phoenixuprising
Copy link
Author

I could add a new py_pex_binary with the same deps as my bug report to verify the failure case. Just wasn't sure if you all would want arbitrary deps just for testing that or not.

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.

[Bug]: java.io.IOException: Cannot run program ... Argument list too long when generating pex
2 participants