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

hundreds-father-404

07/29/2020, 6:39 PM
Fun, I think that Pants has been running system Pex this whole time for me? John’s PR made me realize that. See https://travis-ci.com/github/pantsbuild/pants/jobs/366361029#L505. We’re trying to run
pex
, rather than something like
./pex
.
w

witty-crayon-22786

07/29/2020, 6:46 PM
it wouldn’t be system, but it could be the one from pants’ venv…?
h

hundreds-father-404

07/29/2020, 6:46 PM
Ah, yeah, that makes sense. I’m putting up a fix for this as a precursor
w

witty-crayon-22786

07/29/2020, 6:47 PM
but also, i think
./
might not be necessary in this context… afaik, that’s a shell affordance
is it
pex.pex
?
h

hundreds-father-404

07/29/2020, 6:48 PM
The binary is called
pex
. By using
./pex
, we are disambiguating that we want the local file
pex
, and not to search the PATH
w

witty-crayon-22786

07/29/2020, 6:48 PM
we’re not in a shell
so there is no path searching
but yea, i donno.
i do know that because there is no shell, the kernel directly executes the args
(and it or libc is what supports the shebang)
h

hundreds-father-404

07/29/2020, 6:50 PM
Hm, any idea what that error would be then? And is there anything wrong with prefixing
./
? If anything, it makes the error messages less confusing imo
w

witty-crayon-22786

07/29/2020, 6:50 PM
you’re 100% sure that that’s the name of the file inside the snapshot?
…and that it is included?
@hundreds-father-404: could inspect the run with
--no-process-execution-cleanup-local-dirs
h

hundreds-father-404

07/29/2020, 6:52 PM
Yes, at least it is intended to be. The way
ExternalTool
works is that you download either a single file or an archive, then set
generate_exe()
to say what the path is to the binary within that archive There was an affordance that if the download is a single file, you can leave off the method, and we’ll guess the name of the exe. But we weren’t prefixing that with
./
w

witty-crayon-22786

07/29/2020, 6:52 PM
ok.
i just realized that what i said about PATH searching above is not true. you can directly invoke something that is in the PATH… we know, because we used to for
python
here.
h

hundreds-father-404

07/29/2020, 6:53 PM
Exactly, that’s what I’m thinking
w

witty-crayon-22786

07/29/2020, 6:54 PM
k. sorry for the smoke screen
h

hundreds-father-404

07/29/2020, 6:54 PM
That’s okay, this is really confusing stuff. I appreciate you talking it through!