-
Notifications
You must be signed in to change notification settings - Fork 660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
⚙️ Low level compiler APIs #4026
Comments
Another potential use-case: have the generated models implement |
I don't think the Parcelable use case holds. Serializing a model usually requires some context (variables, scalar adapters, defer labels, etc...) so it's better addressed through serialization using fromJson/toJson instead of implementing Parcelable/Serializable |
Another potential use case: the ability to make the generated types |
Another potential use case: Adding default values to Apollo Models w/o writing a custom directive i.e.
|
This can also be used to add getters/setters in Java models (#4210) |
Also, #4253 |
With #4210, hooks can now be set to intercept and manipulate KotlinPoet / JavaPoet builders before they are written to the disk. A few examples of using it are available here. This will be in the next release, in the meantime it can be tried out with the snapshots. The API is marked as experimental for now, feedback is appreciated! |
Available in 3.7.0 |
It has come up a few times that tweaking the compiler output is desired. This issue is to brainstorm about possible extension points for the compiler and collect use cases.
FileSpec.Builder
: Support for primitive type names in schema enum types #4023One of the challenges is going to be how to expose that to Gradle. Because every Task input must be serializable, providing code is not easy.
OperationOutputGenerator
for an example uses a small workaround that the user has to manage a version by hand, which is not ideal for code that might change more often.Another one is that this will certainly require keeping the KotlinPoet classes in the R8 configuration, which means it's more likely to clash with other buildscript dependencies.
The text was updated successfully, but these errors were encountered: