New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add pants_requirements
target generator and deprecate pants_requirement
macro
#13512
Add pants_requirements
target generator and deprecate pants_requirement
macro
#13512
Conversation
src/python/pants/backend/python/macros/pants_requirements_test.py
Outdated
Show resolved
Hide resolved
3db8ebd
to
d207fd2
Compare
src/python/pants/backend/python/macros/pants_requirement_caof.py
Outdated
Show resolved
Hide resolved
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
d207fd2
to
0b4f620
Compare
src/python/pants/backend/python/macros/pants_requirement_caof.py
Outdated
Show resolved
Hide resolved
# Macros | ||
*pants_requirements.rules(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question that I don't know the answer to: should this be in a separate backend? The implication would be that the first step of plugin development would be "enable to the plugin_development
backend" or something. But it might avoid some confusion of having it listed in the python
backend as a whole.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I like that. We have a tonnnn of targets right now with ./pants help
.
But hey, that makes me wonder, why even have pantsbuild.pants.testutil
anymore?? I theoretically get the argument that pantsbuild.pants
should be as small as possible for end-users. But in reality, pantsbuild.pants.testutil
is only 23.2kb. I'll bring this to Slack
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Answered in Slack. It's useful to have pantsbuld.pants.testutil
(or the extra pantsbuild.pants[testutil]
) so that our test support can depend on extra third-party requirements. At that point, we can stick with the two dists because it's roughly a different typing of the single dist with an extra.
So, pants_requirements
still makes sense. We only need to create a dedicated backend.
Would <3 to see this land... :) |
Prework for #13512. We need to stop using `pants_requirement`. [ci skip-rust] [ci skip-build-wheels]
…ments [ci skip-rust] [ci skip-build-wheels]
Progress towards #12915.
This new target generator is much more useful. It leans into the reality that Pants 2 only releases
pantsbuild.pants
andpantsbuild.pants.testutil
, and that almost always you want to use both when developing plugins. It also removes irrelevant fields likedist
andmodules
.The version is also more flexible now, as described in the new
help
message.--
Note that this is our first time we're using target generator syntax
dir:tgt#gen
in non-Go code. Even though #12917 is not decided, there seems to be consensus on using target generator syntax for file-less targets likepython_requirement
.