What would people think of Pants adding an automat...
# general
h
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
thanks for opening the topic, I wasn’t aware of that feature 🙂
h
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