Outside of the documentation, are there any blog p...
# development
w
Outside of the documentation, are there any blog posts, or good design docs/github issues regarding field sets, targets, and the various types of targets (Wrapped, Coarsened, etc) and when to use them? I've noticed that I spend more time trying to dig around the pants repo for examples of using these concepts, than I am actually writing the plugin/whatever code itself. And inevitably, when I come back to something after a week, I need to re-do a lot of that
To give an idea of the scale of what I mean here... When I was writing the Swift backend, and right now, as I'm writing the CC backend, the actual "business" part of that (compiling, linking, flags, toolchains, etc) has taken about 1 hour for some simple 1st party code. Digging around trying to figure out the canonical way to create requests, starting from the CheckRequest's field_sets and moving down the pipeline to get that over to my compilation step has probably taken 4 hours. Those numbers feel backwards 🙂
w
sadly, no: feedback very welcome (in the form of issues) about APIs that feel awkward.
this is mostly because of the lack of API stability: Eric has been discouraged from updating the plugin docs because things continue to change rapidly
https://pantsbuild.slack.com/archives/C0D7TNJHL/p1658163947976149 was a thread recently about plugin API stability: Andreas is likely to raise it at the next contributors/maintainers meeting
w
Thanks @witty-crayon-22786 - for the internal, developer-centric API, I'm far less concerned about stability... Easier to bob and weave and there are significantly fewer Pants developers/contributors vs the public API. I guess I'm just stuck doing what I've been doing, but I feel like there is just one layer of muck I'm struggling with - the rest has been straight-forward actually since I did my first plugin. The field sets vs targets (and associated targets) has never settled in my brain for whatever reason.
w
yea… FieldSets are entirely internal, so they’re still just part of the plugin API… technically, all of Target inheritance is too, since end users don’t care about inheritance or the relationships between Targets classes at all
(afaik)
i expect that because you started using the plugin API so early in your Pants experience, the boundary between internal/external is more muddled for you
it just occurred to me that if @hundreds-father-404 can dig up the design doc for Target/FieldSets, that would probably still be 95% accurate
w
THat would be dope! I spent a couple hours last night reading and re-reading the docs (Concepts, Targets, FieldSets, etc) - still a couple pieces I don't understand, so I don't really know how I should be doing certain parts of these things.... Buuuut, in general, it's not stopping me from building anything. Just making the code a bit ... weirder 🙂