cool-easter-32542
07/22/2023, 3:04 PMpants publish will also run package, for both X & Y.
Pants does not provide any context to plugins, so its impossible for a plugin running for Y, in charge of calculating its version, to know which version to provide.
Pants version
2.16.0
OS
Both
Additional info
I'm managing a Python monorepo with Pants. As part of my CI flow, I'm running:
pants --changed-dependents=transitive --changed-since=$last_publish_commit_sha publish
I also have a custom plugin that calculates the next version based on existing git tags (it also pushes the tag).
Assuming X changed, and X uses Y, in order to generate setup.py for X, pants packages Y for its version.
Because the plugin assumes it is invoked for changed packages only, it returns the next version of Y, which never gets published.
Slack thread
Somewhat Related issues: #18179, #16360
pantsbuild/pants