screwing around with things right now and the new ...
# development
a
screwing around with things right now and the new ExternalTool and Target APIs are VERY hype
🎉 1
❤️ 1
h
The Target API goes public soon. Once I finish docs, it’s my next project to make public. Lmk if you have any feedback before we release it!
a
getting fields with
__class_getitem__
is the best thing i've ever seen in my life and i could not figure out how to do that before
❤️ 1
h
Yay! And use .get() if that field might not be registered on the target type and you’re fine with the default for that field Otherwise, pre-filter with .has_field()
a
that's incredibly hype
i'm not at the level of targets yet, i'm working on getting a cargo together that we can invoke hermetically (i just shelled out last time). i hope to be there in an hour or so
💯 1
h
One of the coolest thing about the target API is allowing you to add new fields to preexisting core target types in your plugin. Uses the design you and Stu came up with in the winter! https://github.com/pantsbuild/pants/blob/d963859bcf5bfc8a6169d3a38dca634c7cabd6d2/src/python/pants/backend/codegen/protobuf/python/additional_fields.py#L13
a
i thought we all came up with that the time benjy and folks came over to twitter and we sat at that massive V-shaped table
thank you for the protobuf example!!! i've been going off of existing code for ExternalTool and it's a great reference
❤️ 1
h
Oh, probably. I was teaching back then and was in the middle of 3rd period during that meeting I think hah
a
that's why i was glad to see you being able to make the target API really shine
❤️ 1
your work made it something i actually want to use
🎉 1
very very cool
h
Yay! Built on the design of giants :) I only synthesized and tweaked what you all come up with. It’s a cool example of open source
a
pants has a lot of that and i think the v2 engine allows things to be layered and improved really orthogonally
💯 1
it helps that everyone prefers to use existing code rather than write new code. the culture here is very hard to duplicate
💯 1
h
@aloof-angle-91616 What's this about cargo? Are you working on rust support?
a
yes!