You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the Pex CLI(s) only support command line arg control. The env var control is only formally supported and documented via --help-variables for runtime control over PEX files. Like many options systems, it would be good if the Pex CLIs could be controlled by either env var or command line arg for every command line arg they currently accept. It probably also makes sense to support toml config since toml is now vendored to support PEP-517 / PEP-518. The latter would provide, amongst other things, a nice way to seal in modern defaults for Pex CLI options like --resolver-version pip-2020-resolver and --pip-version ....
The text was updated successfully, but these errors were encountered:
…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.
Currently the Pex CLI(s) only support command line arg control. The env var control is only formally supported and documented via
--help-variables
for runtime control over PEX files. Like many options systems, it would be good if the Pex CLIs could be controlled by either env var or command line arg for every command line arg they currently accept. It probably also makes sense to support toml config since toml is now vendored to support PEP-517 / PEP-518. The latter would provide, amongst other things, a nice way to seal in modern defaults for Pex CLI options like--resolver-version pip-2020-resolver
and--pip-version ...
.The text was updated successfully, but these errors were encountered: