jolly-midnight-7275911/16/2020, 6:35 PM
would return a report on what's in
pex query pants.pex
without having to do the unzip song and dance.
. In which case maybe
(need a shorter name) should become a thing. Any interest?
hundreds-father-40411/16/2020, 6:37 PM
Does pex have a query feature?No, outside of
and then piping into JQ or Python’s json module I suspect that there might be more skepticism to adding, as Pex much more closely follows the Unix philosophy of the tool doing one thing and doing it well, unlike Pants trying to bake most things in. But could be useful. What would you expect the output of query to be? Is it shorthand for
Maybe that would be out of scope of pex. In which case maybe pexinterrogator (need a shorter name) should become a thing. Any interest?Might make sense, but I suspect it’d still be better to rely on tools that already work great like unzip and JQ. One thing we could improve is the docs for Pex to give query recipes!
jolly-midnight-7275911/16/2020, 6:39 PM
hundreds-father-40411/16/2020, 6:40 PM
jolly-midnight-7275911/16/2020, 6:41 PM
unzip -p skelpants.pex PEX-INFO | jq -S .
enough-analyst-5443411/16/2020, 7:54 PM
hundreds-father-40411/16/2020, 8:08 PM
It’s enough of a hint to check those tools out if people aren’t already familiar with unzip and jq, without rewriting their docs.is a JSON file with metadata about the distribution. You can use it to query the build, e.g.
unzip -p foo.pex PEX-INFO | jq ...
enough-analyst-5443411/16/2020, 8:24 PM
without rewriting their docs.By distribute command line docs, I meant exactly not repeating your 2nd sentence in every tool (like) pex that happens to tangentially involve json.
jolly-midnight-7275911/16/2020, 9:01 PM
is a zipped file is a reasonable stopping place for its docs. Case in point, I've never bothered to remember the exact sequence for taring up a directory before sending it over an ssh pipe to another machine because all I have to remember is
then find the example. Had that example not been there, I might actually remember the exact format and then use that in more places then just when I need to transfer a dir hierarchy from one box to another.
enough-analyst-5443411/16/2020, 10:24 PM
hundreds-father-40411/16/2020, 10:26 PM
jolly-midnight-7275911/17/2020, 6:08 PM