I’m curious, why kotlinx metadata only support rea...
# compiler
z
I’m curious, why kotlinx metadata only support read annnotations from
typealias
, why not add this ability for all Km element, like `KmProperty`/`KmFunction`? I hope to read the annotation of kotlin properties at the jvm bytecode. Now I need to read
syntheticMethodForAnnotations
in metadata, and then go to the bytecode to find its
annotations
. This is very cumbersome.
z
Kotlinx-metadata doesn’t try to duplicate all the information, that would be expensive and wasteful. It tries to just contain enough metadata to bridge the gap, and the rest you can extrapolate from bytecode
z
yeah, It is true that other information can indeed be inferred from the bytecode, but I really want to do something like KSP at the bytecode level, because KSP could only in single module, it is difficult to cross-module, and it also couldn’t change the source codes. and I also want to enjoy the convenient api like KSP,😂 rather than using very complex APIs like ASM.