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

aloof-angle-91616

05/07/2020, 4:16 AM
screwing around with things right now and the new ExternalTool and Target APIs are VERY hype
🎉 1
❤️ 1
h

hundreds-father-404

05/07/2020, 4:19 AM
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

aloof-angle-91616

05/07/2020, 4:20 AM
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

hundreds-father-404

05/07/2020, 4:21 AM
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

aloof-angle-91616

05/07/2020, 4:22 AM
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

hundreds-father-404

05/07/2020, 4:24 AM
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

aloof-angle-91616

05/07/2020, 4:25 AM
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

hundreds-father-404

05/07/2020, 4:26 AM
Oh, probably. I was teaching back then and was in the middle of 3rd period during that meeting I think hah
a

aloof-angle-91616

05/07/2020, 4:26 AM
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

hundreds-father-404

05/07/2020, 4:30 AM
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

aloof-angle-91616

05/07/2020, 4:31 AM
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

happy-kitchen-89482

05/07/2020, 5:37 PM
@aloof-angle-91616 What's this about cargo? Are you working on rust support?
a

aloof-angle-91616

05/07/2020, 5:38 PM
yes!