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

hundreds-father-404

04/21/2021, 5:33 PM
What would people think of Pants adding an automated mechanism to validate that artifacts built with
./pants package
are valid? For example, something like this:
Copy code
pex_binary(name="main", entry_point="main.py", validate_argv=["--help"])
Then Pants would run
dist/../main.pex --help
for you as part of
./pants package
The validation would probably need to be pretty simplistic, something you can express in a BUILD file like the
argv: list[str]
. I think we'd want the mechanism to be really accessible to use, rather than requiring writing a plugin But we could maybe add a plugin hook for more complex situations
Nvm! I forgot about https://www.pantsbuild.org/docs/python-test-goal#depending-on-packages, and I think this probably intersects too closely with that to be worth another mechanism
c

curved-television-6568

04/21/2021, 5:42 PM
thanks for opening the topic, I wasn’t aware of that feature 🙂
h

hundreds-father-404

04/21/2021, 5:51 PM
I definitely think we need to do a better job documenting it, especially by cross referencing it in the docs on packaging / pex It's a super cool feature, one of the coolest Pants offers imo! props to @happy-kitchen-89482
👍 1
3 Views