https://pantsbuild.org/ logo
#development
Title
# development
w

witty-crayon-22786

05/28/2020, 6:40 PM
@hundreds-father-404: re: contrib_plugin: can it be an object …?
i don’t see anything in there that actually requires inspecting the filesystem
h

hundreds-father-404

05/28/2020, 6:43 PM
Oh, maybe? Would the targets be
python_library
and they say something like
provides=contrib_plugin_setup_py
?
requires inspecting the filesystem
We read files like
1.29.x.rst
w

witty-crayon-22786

05/28/2020, 6:44 PM
that would work too, yea.
h

hundreds-father-404

05/28/2020, 6:44 PM
that would work too, yea.
What were you envisioning?
w

witty-crayon-22786

05/28/2020, 6:44 PM
i think i was wrong about it being an object, because it is in fact a macro for creating a target
if you removed most of the validation, it’s possible that it could be a new style macro. or we could add builtins that it could use to do its work.
(where builtin effectively means…
object
, confusingly)
h

hundreds-father-404

05/28/2020, 6:45 PM
if you removed most of the validation
Minus reading the release note files from the FS, I think.
w

witty-crayon-22786

05/28/2020, 6:46 PM
that feels like an AsyncField
mayhaps
h

hundreds-father-404

05/28/2020, 6:46 PM
Maybe, but then we have to make
ProvidesField
async for every call site
w

witty-crayon-22786

05/28/2020, 6:46 PM
but, also: what you said about just providing an
object
for the provides clause would work too.
it’s an interesting testcase though, for sure.
h

hundreds-father-404

05/28/2020, 6:47 PM
I’ll try the
object
approach, I think
w

witty-crayon-22786

05/28/2020, 6:47 PM
https://pantsbuild.slack.com/archives/C0D7TNJHL/p1590691605444400?thread_ts=1590691219.441400&cid=C0D7TNJHL this is part of the reason why daniel and i think that that should be the default.
h

hundreds-father-404

05/28/2020, 6:48 PM
Agreed with the desire. But again, I think we need to solve those couple major boilerplate issues I flagged, otherwise we’ll get a proliferation of boilerplate and complexity
w

witty-crayon-22786

05/28/2020, 6:48 PM
chicken and egg
but glad we’re in agreement on that aspect
h

hundreds-father-404

05/28/2020, 6:50 PM
Yes, I think it’s a tradeoff (like most things). AsyncField makes things much more flexible. But it makes them much more complex and adds more boilerplate. Among other boilerplate, now you need a rule for hydrating your field.
w

witty-crayon-22786

05/28/2020, 6:52 PM
^ @enough-analyst-54434 another relevant recent syntax discussion. see above and https://pantsbuild.slack.com/archives/C0D7TNJHL/p1590092441380300
was the source of my idle “could we use mypy to type infer enough to get the
Get
return type of methods/properties and have
await target.field
?”