What’s the cleanest way to go from target address ...
# general
h
What’s the cleanest way to go from target address to outputted package file path? Essentially, so that I can utilise Pant’s internal check for “does .pex exist already in the place where I would expect it to be output?“. It seems the mapping is simply:
<dir-path>:<target-name>
is output to
dist/<dir-path>/<target-name>.pex
, but is there a way I can use this logic directly?
f
Use
pants peek TARGET
and look at the
output_path
field's value.
h
Strangely, mine is
"output_path": null,
, but that may be because i’m on an older version of Pants
f
What Pants version are you using?
h
2.17 still, lagging behind
f
h
Looks like it’s only generated on certain goals and I may have to re-implement the logic