-
-
Notifications
You must be signed in to change notification settings - Fork 641
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pex-cli: add [pex-cli].args option to pass arguments to the PEX proce…
…ss globally (#21202) A new option `[pex-cli].global_args` has been added to be able to pass arbitrary arguments to the `pex` tool as part of any Pants goal invocation. This should make it a lot easier to modify behavior of `pex` tool without needing to make changes in the Pants codebase. Not having this ability to pass arbitrary arguments to pex makes it really hard to start taking advantage of new features that come with newer versions of pex. For instance, the new `--exclude` flag added recently would require making lots of changes in the codebase to be able to pass those extra arguments. This is because the pex invocations in the Pants codebase are numerous and it's really hard to make sure a particular argument is respected (by keeping the chain of calls correct making sure it does reach the final subprocess spawn). And if it's relevant for multiple goals, this becomes even harder. We would still need to make changes to pass arguments to individual targets, see #20737 or #20939 - this makes sense as those arguments apply only to those targets. However, some options would need to apply for any `pex` invocation (e.g. ignoring all 3rd party dependencies). I've looked into having environment variables support for all flags that PEX has (pex-tool/pex#2242) first (so that no changes are needed in Pants, one would just export a bunch of env vars as needed), but this is not going to happen any time soon, so doing it in the Pants codebase instead is the only path forward, I reckon.
- Loading branch information
1 parent
feedb0f
commit e7d9891
Showing
4 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters