Compiler Plugin API: Any materials on implementation details? #1320
Replies: 1 comment 3 replies
-
Hi :) Disclaimer: keep in mind that extension point used is highly experimental, intended for specific use case of DataFrame library and not guaranteed to continue working in the future. We do not recommend to use it You can read about extension point and overall plugin pipeline here: Otherwise, take a small example like Classes that do main job regarding updating type based on call arguments and resolution: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hiya,
I saw a demo of the DF Compiler Plugin at the KotlinConf 25 keynote:
https://www.youtube.com/watch?v=F5NaqGF9oT4&t=543s
This demo was the highlight of the keynote for me!
The ability to compute value types ad-hoc from user code opens some VERY interesting doors.
My immediate thought it that it would allow you to write type-safe GraphQL clients, for example.
Something like the TypeScript GQL clients such as
genql
andgraphql-zeus
which do this:👇CLICK TO SHOW IMAGE👇
It seems like this should be feasible, since it's similar in theory to the DF functionality.
I could imagine use something like:
Where the computed type would be something like:
I'd be interested in taking a crack at implementing a plugin of this sort.
But I found the docs a bit sparse on the compiler plugin implementation code:
https://github.com/JetBrains/kotlin/tree/master/plugins/kotlin-dataframe
Beta Was this translation helpful? Give feedback.
All reactions