Is everything in `~/.cache/pants` keyed off of the...
# general
c
Is everything in
~/.cache/pants
keyed off of the OS/arch? Or more concretely, if I'm on a macbook, can I bindmount
~/.cache/pants
into a Linux container and run
pants
from both within and without the container? (I don't have a macbook so I'm in part thinking out loud here.)
Seeing
pex_root/venvs/
I admit I'm skeptical
h
Yeah, I would recommend inspecting that closely
e
If the PEX file is not multiplatform, you're good to go. If it is, then, assuming your not using something like
PEX_PYTHON=python3.10 my.pex ...
to run the PEX, you should be good to go as long as the Pythons used on the Mac and Linux side don't have the same absolute path for the Python executable: https://github.com/pantsbuild/pex/blob/5c0c29c192bd99335b5a1ab5b68a0f8556cd97aa/pex/variables.py#L773-L900. I did not think to defend against that corner case.
I'd be happy for a Pex issue though that asked for explicit support for multiplatform support in 1 Pex cache to make sure docker-style uses of shared cache do the right thing. Better to be planned than sort of work by accident.