korlibs / korge

KorGE Game Engine. Multiplatform Kotlin Game Engine
https://korge.org/
Other
2.59k stars 124 forks source link

Compiler plugin for korinject automapping #749

Open soywiz opened 3 years ago

soywiz commented 3 years ago

https://blog.bnorm.dev/writing-your-second-compiler-plugin-part-1

We should use IR on JVM too

soywiz commented 3 years ago

Tried kotlinx.serialization but we cannot get a KClass<*>, KType or Serializer from a SerialDescriptor, so can't get the right instances from the injector without having to specify the types somewhere.

Failed experiment: https://github.com/korlibs/korinject/tree/kotlinx.serialization.experiment

soywiz commented 8 months ago

Now that K2 is approaching. Let's retake on this and other plugins that will allow to write the korge code we wanted in the first instance: