fast-nail-55400
02/04/2025, 8:21 PMpants.testutil.pants_integration_test
helpers to avoid a plugin resolution issue with there being a copy of packaging
on the test's PYTHONPATH
and pants.testutil.pants_integration_test
using the test's PYTHONPATH
even when hermetic=True
).
1. Any objection if I make some of the --python-*
options be read at bootstrap scheduler time so plugin resolution can use them? Plugin resolution does not appear to currently respect an updated --python-pip-version
nor an updated Pex version from the --pex-cli-*
options. As to why ... I am seeing a 25 second bootstrap time for plugin resolution in an integration test of mine for just an out-of-tree plugin available as a wheel locally. I'd like to see if newer Pex / Pip can reduce that resolution time.
2. I am also seeing plugin resolution occur twice in the same integration test to just get to a point where I can run the integration test. So the 25 second penalty is being paid twice. Unclear to me on first inspection other than maybe the creation of a new session here.happy-kitchen-89482
02/05/2025, 1:25 AMhappy-kitchen-89482
02/05/2025, 1:25 AMhappy-kitchen-89482
02/05/2025, 1:25 AMhappy-kitchen-89482
02/05/2025, 1:27 AMfast-nail-55400
02/05/2025, 1:38 AMSo I guess we must either allow those options to be read (and then we may want to promote them to be global “bootstrap options”? or maybe we don’t have to?), or we create an alternative mechanism for plugin resolution via a vanilla venv and pip, or somethingWhat if Pants or the scie-pants just invokes the
pip
in the Pants venv to install plugins?happy-kitchen-89482
02/05/2025, 1:46 AMfast-nail-55400
02/05/2025, 1:50 AMfast-nail-55400
02/05/2025, 1:50 AMfast-nail-55400
02/05/2025, 1:51 AMfast-nail-55400
02/05/2025, 1:51 AMfast-nail-55400
02/05/2025, 1:52 AMfast-nail-55400
02/05/2025, 1:52 AMfast-nail-55400
02/05/2025, 2:06 AMproud-dentist-22844
02/05/2025, 4:48 PM.pth
file in the pants venv that injects the plugin venv. Or the other way around, a .pth
file in the plugin venv that injects the vanilla pants venv's paths. That should make rebuilding the custom plugins venv lighter weight.fast-nail-55400
02/11/2025, 10:15 PMfast-nail-55400
02/11/2025, 10:19 PMPexCliProcess
directly (from a rule)? Instead of invoking the VenvPex
machinery for this bootstrap use case. That might allow us to have a "plugin resolution scheduler" with a much narrower scope (i.e., no need to load the Python backend there) as compared to the current "bootstrap scheduler."fast-nail-55400
02/11/2025, 10:27 PMBUILD
file parsing code to be present in the bootstrap scheduler (since referenced by the Python backend). And that code consumes BootstrapStatus
so it can avoid erroring during the bootstrap scheduler run. Simpler code if it does not need to know about BootstrapStatus
.