https://pantsbuild.org/ logo
#development
Title
# development
c

curved-television-6568

01/05/2022, 5:49 PM
on the topic of packaging a pants pex and distributing pants as a pex (https://github.com/pantsbuild/pants/issues/12397) would that mean that we could have a “pants binary” installed on the system rather than relying on a “bootstrap”
./pants
script in every repo?
e

enough-analyst-54434

01/05/2022, 5:51 PM
We could do that regardless of distribution method.
c

curved-television-6568

01/05/2022, 5:52 PM
Perhaps it doesn’t give you much, as each project may not use the same version of pants any way… ?
e

enough-analyst-54434

01/05/2022, 5:53 PM
Not sure, but you would still need "install right version and reexec" logic to handle that.
1
h

happy-kitchen-89482

01/05/2022, 6:00 PM
Yeah, I think the benefit of distributing Pants as a standalone binary (with an embedded interpreter, ideally) is avoiding bootstrapping flakiness. I think you'd still want a wrapper script to select the Pants version for the repo.
👍 2
c

curved-television-6568

01/05/2022, 6:08 PM
you could get rid of the wrapper script, at least the need to have one in every repo, by having a shim on the path, that forwards your request to the appropriate pants binary. Thinking a little like how pyenv selects your version of python to use, for instance..
w

witty-crayon-22786

01/05/2022, 6:14 PM
@curved-television-6568: but that would mean that you’d have a separate install and upgrade step for the shim, independent of the per-repo step
but it would have the benefit of making the
pants
executable location independent, which would be handy for eventually resolving https://github.com/pantsbuild/pants/issues/6465 =P
c

curved-television-6568

01/05/2022, 6:26 PM
that would mean that you’d have a separate install and upgrade step for the shim
true, that’s 👎
w

witty-crayon-22786

01/05/2022, 6:35 PM
i suppose though that it’s already the case that the
pants
script itself periodically needs upgrade
my understanding of
asdf
is that it’s a generalization of
pyenv
-alikes to support more tools, although i’ve never used it
c

curved-television-6568

01/05/2022, 6:36 PM
hmm.. there’s a tradeoff between having the wrapper script per repo or per machine..
interesting..