https://pantsbuild.org/ logo
h

hundreds-father-404

09/23/2020, 9:28 PM
Do y’all know why we use a
tool.pex
,
requirements.pex
, and
runner.pex
for things like Pytest? I think the
runner.pex
can be consolidated into the
tool.pex
. Iirc, it was to avoid having to recreate the
runner.pex
when you do something like bump a tool’s version. But that doesn’t seem like we save much; all the
runner.pex
ever does is set up an entry-point and
--pex-path
, which is trivial to do directly on the
tool.pex
in the first place.
w

witty-crayon-22786

09/23/2020, 9:40 PM
sounds right. but not sure what the contents of tool.pex would even be…
i don’t see anything called tool.pex ?
h

hundreds-father-404

09/23/2020, 9:41 PM
pytest.pex
vs.
pytest_runner.pex
.
mypy.pex
vs.
mypy_runner.pex
My proposal is to considlate into simply
pytest.pex
and
mypy.pex
w

witty-crayon-22786

09/23/2020, 9:41 PM
ah.
yea, probably. still not clear what they contain, but.
h

hundreds-father-404

09/23/2020, 9:43 PM
pytest_runner.pex
contains nothing. It’s simply the metadata for the entry point, +
--pex-path
pytest.pex
contains the requirements for the tool itself
h

happy-kitchen-89482

09/24/2020, 1:11 AM
There presumably was a reason
Maybe the metadata changes more frequently ?
h

hundreds-father-404

09/24/2020, 1:13 AM
I think that might be what we were thinking, but it doesn’t seem to change unless the user for some reason sets a custom entry point I do know that we expected the tool Pex to be rebuilt a lot from version bumps. And that we didn’t want the runner Pex to have to change. But I think our miscalculation is that adding the metadata to the original tool Pex has a trivial cost