hundreds-father-404
09/09/2020, 1:19 AMfind_binary
uncachable? It relies on the external state on the machine, and things will break if suddenly a certain binary is no longer available at the original path. Or if you added a new binary and want it to be recognizedhundreds-breakfast-49010
09/09/2020, 3:37 AMhundreds-breakfast-49010
09/09/2020, 3:38 AMfast-nail-55400
09/09/2020, 4:52 AMhundreds-father-404
09/09/2020, 4:53 AMBinaryPaths
only finds the path to the binary, rather than the actual binary. But maybe it should store a private hash! That would properly fix the issue that motivated me to make this change and that I didn’t actually fix
Here’s the dataclass:
@dataclass(frozen=True)
class BinaryPaths(EngineAwareReturnType):
binary_name: str
paths: Tuple[str, ...]
hundreds-father-404
09/10/2020, 1:32 AM/Users/eric/.pyenv/shims/python3
. Calling shasum
on it is always the same value. We would need to follow the symlink to get the actual binary. Can you think of any issues with doing that?fast-nail-55400
09/10/2020, 2:21 AMfast-nail-55400
09/10/2020, 2:21 AMhundreds-breakfast-49010
09/10/2020, 2:26 AMhundreds-father-404
09/10/2020, 2:34 AMfast-nail-55400
09/10/2020, 2:38 AMpyenv which python
to have it print out the pathfast-nail-55400
09/10/2020, 2:38 AMpyenv which python3.7
etc.)fast-nail-55400
09/10/2020, 2:38 AMhundreds-father-404
09/10/2020, 2:42 AMPexEnvironment
abstraction which finds the interpreters by calling the super generic BinaryPaths
rule
We need a way to identify if it’s a Pyenv interpreter or not, though. I’m not sure how complex to go here. I do think that pyenv global
not causing Pants to change behavior is pretty confusing for a userfast-nail-55400
09/10/2020, 2:49 AMpyenv global
are stored in $PYENV_ROOT/version
fast-nail-55400
09/10/2020, 2:50 AM$PYENV_ROOT/versions/VERSION
)