<@UB2J9BQA0>: re: contrib_plugin: can it be an obj...
# development
w
@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
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
that would work too, yea.
h
that would work too, yea.
What were you envisioning?
w
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
if you removed most of the validation
Minus reading the release note files from the FS, I think.
w
that feels like an AsyncField
mayhaps
h
Maybe, but then we have to make
ProvidesField
async for every call site
w
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
I’ll try the
object
approach, I think
w
https://pantsbuild.slack.com/archives/C0D7TNJHL/p1590691605444400?thread_ts=1590691219.441400&amp;cid=C0D7TNJHL this is part of the reason why daniel and i think that that should be the default.
h
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
chicken and egg
but glad we’re in agreement on that aspect
h
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
^ @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
?”