-
Notifications
You must be signed in to change notification settings - Fork 7
Macro API design discussion #91
Comments
Another area we need to evaluate is the Query API and how we want to make that slot into the phases, but I don't have a proposal for it. |
Thanks for pushing on this Jake ... there is a surprisingly large amount to unpack here :) Re: "description field". With Macro application annotation identification we haven't fleshed out how the host finds out implementation detail of the macro, such as phases. What we currently have in v2 is that macro implementation detail is sent by the macro on startup in So to support fine-grained interfaces per the v1 API we would have:
and then we have a few more questions about how this whole thing ties together:
Metadata and Another consideration here is that I think the I think a good path is to push for one e2e example that works like a v1 macro, it's not clear to me that we're headed for something exactly like v1 macros, but if there are going to be any differences then we can figure out what+why along the way.
Just one note here. If I understood correctly, builders are code running on the client that helps to create Dart code. That's fine, but we should think about forwards compatibility: what happens when a new language version requires something different? We might need a way to introduce new code paths for new language versions. Again I think probably some simple e2e example to prove out the new ground here is probably a good way to go. Indeed, let's discuss :) thanks! |
It is a combination of client + server side right now. The client side only ever generates a single declaration, and not any surrounding declarations (but will have a reference to which surrounding declaration it is generating it for). The server side then merges all those declarations together from all the macros, under a single augmentation of the surrounding declaration. We could move literally all of it server side though, if that would be better. It might even be a requirement, because if the queries are not complete, the client might not have the required information to generate the full declaration. |
Part of #91 Sending this out a bit early - this is I think the smallest chunk I could tackle independently, but it would be nice to get a review before you leave. The next step would be passing the actual target through to the macro api, probably instead of the AugmentRequest.
Copying a comment from #104, we decided on the following additional things regarding builder objects:
|
I wanted to discuss the overall design of the macro APIs that people are coding against. Ultimately, my goal is to move them much closer to the existing APIs with the exception of the introspection APIs.
Some specific changes I want to make:
Builder
APIs for how you actually perform augmentation, replacing the AugmentationResponse and Augmentation classes we have today. The AugmentationResponse would change how it is structured to match something more like the MacroExecutionResult.cc @davidmorgan maybe we should discuss tomorrow am?
The text was updated successfully, but these errors were encountered: