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

witty-crayon-22786

10/22/2021, 9:56 PM
@hundreds-father-404: looks like
gzip
isn’t as common as
tar
or
unzip
, so i’m thinking of having https://github.com/pantsbuild/pants/pull/13335 use the Python
gzip
module
to do that, i’ll need to select a Python in a generic way. we already do for PEX creation, so maybe i should move “bootstrap python” selection out into the core?
heading in the direction of treating both
bash
and
python
as scripting environments that we support in the core, basically
h

hundreds-father-404

10/22/2021, 9:59 PM
What's the motivation here?
w

witty-crayon-22786

10/22/2021, 10:00 PM
for extracting
.gz
files?
er, the missing bit is that
gunzip
isn’t present in our CI environment (although it is on my mac), so i doubt that we should require it for JVM support.
👍 1
h

hundreds-father-404

10/22/2021, 10:02 PM
Hm how do our tests pass for extracting
tar.gz
files right now?
w

witty-crayon-22786

10/22/2021, 10:02 PM
we use
tar
👍 1
which must use
gzip
as a library, rather than as a binary
h

hundreds-father-404

10/22/2021, 10:04 PM
Got it. Should this instead be done via the native engine? John has pointed out that it would be better for us to be using Rust for all of
archive.py
, reduce # of non-hermetic dependencies. Might improve cache hits for desktop builds with remote caching also?
w

witty-crayon-22786

10/22/2021, 10:06 PM
the downside of doing it natively would be not caching it, or remoting it
and the same actually goes for downloading things… moving that out of native code into the sandbox would be better for remote execution
if we moved it into native code, we’d have to build a native binary to ship around
👍 1
so, given that: does what i said make sense? lifting Python support out as something to script with? i guess the bar would be “zero thirdparty dependencies”, so we wouldn’t bring PEX out into the core (yet?)
h

hundreds-father-404

10/22/2021, 11:02 PM
Yeah, agreed. And Python 3.6+ plus perhaps? So scripts don't need to worry about Python 2.7 compat (less to test etc)
w

witty-crayon-22786

10/22/2021, 11:02 PM
yea
h

hundreds-father-404

10/22/2021, 11:10 PM
Imo, we could update our Pex runner code to stop looking at Python 2, at least by default
👍 1