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

curved-television-6568

09/02/2021, 7:00 AM
I kind of miss documentation for all object types in the docs. There are only for subsystems, goals and top level target types. But if I look at
python_distribution
for instance, it mentions a type
PythonArtifact
for the
provides
field, but that type is not documented (online). Nor does it mention the alias for it, so I’d have to guess that it is
python_artifact
however, the docs use its synonym
setup_py
quite often too… so for new users, I think this is a frustrating thing to grok.
h

hundreds-father-404

09/02/2021, 7:07 AM
Agreed. Old style macros like python_requirements are also not documented, altho that will hopefully be fixed in the next month by target generation https://github.com/pantsbuild/pants/issues/7022 Objects would remain undocumented though. @happy-kitchen-89482 any insight on how hard it would be to wire those up to pants help-all?
c

curved-television-6568

09/02/2021, 7:08 AM
Ah, of course, it is that output you use.. go figure. haha.
h

hundreds-father-404

09/02/2021, 7:20 AM
Yeah if that gets wired up, it becomes trivial to hook up to the docs :)
👍 1
h

happy-kitchen-89482

09/02/2021, 7:53 AM
I'm not sure how hard, but it may not make sense to document it as floating under some generic "objects" category. Probably the right place for the
python_artifact
documentation is nested within the documentation page for
python_distribution
.
h

hundreds-father-404

09/02/2021, 7:55 AM
Actually it looks like the only "objects" left are `python_artifact`/`setup_py`, and `pants_version`/`get_buildroot()`. We don't document the latter two, and I see no reason
pants_version
would be useful I think we want to already kill
setup_py
in favor of the Target API. I doubt we would ever add an
object
in the future, now that we have the Target API So, rather than implementing this, maybe we should more into dropping
objects
h

happy-kitchen-89482

09/02/2021, 7:58 AM
I mean, I'm all for that
c

curved-television-6568

09/02/2021, 8:06 AM
What does “dropping objects” imply?
getting rid of
python_artifact
too.. ?
h

hundreds-father-404

09/02/2021, 8:08 AM
Yeah, which you proposed in https://github.com/pantsbuild/pants/issues/12410 😉
c

curved-television-6568

09/02/2021, 8:10 AM
LOL! RIght! 😛
OK, that’s actually a good way forward, then 😛
💯 1
h

hundreds-father-404

09/02/2021, 4:01 PM
Well that makes things easier! Turns out we didn't ever register
get_buildroot()
, I think as of changing to Pants 2. So it's not just undocumented, it's unused
setup_py
will be the only remaining
object
, which is blocked by having target generation so that we can deprecate the setup-py plugin hook in favor of more generic target generation
c

curved-television-6568

09/02/2021, 4:55 PM
Are you referring to the SetupKwargsRequest -> SetupKwargs union? can’t that work any way, without setup_py.._
h

hundreds-father-404

09/02/2021, 4:57 PM
yep, exactly. Yeah actually I think you're right, it's still possible to support that plugin hook! It would be better to have proper target generation, but in the meantime
so..I think no blockers for deprecating
provides=
? Only need to figure out how to set
__hash__
safely on the
extra_setup_kwargs
field
👍 1
3 Views