Is there any way to see compose generated code in IDE?
👀 2
g
gildor
03/07/2022, 12:53 PM
Compose doesn't generate code, it changes compiler output which is bytecode
You can find the generated .class file in build dir of the project or in resulting app
r
ritesh
03/07/2022, 1:18 PM
Ahh okay, so all addition of
composer
and
recompose
etc.. happens at run-time by
compose run-time
Was wondering if i can see a visualisation tree or the intermediate files in different use-cases.
Thanks.
g
gildor
03/07/2022, 1:24 PM
It's not happening on runtime, it's happening during compilation
Compose uses compiler plugin for Kotlin compiler
👍 1
j
jossiwolf
03/07/2022, 8:51 PM
cc @amanda.hinchman-dominguez who has great Kotlin compiler knowledge🙂 In case you have a more drawn-out explanation of annotation processing vs compiler plugins (I'd love to learn more 😄)
➕ 2
r
ritesh
03/07/2022, 9:49 PM
That would be great!
g
gildor
03/08/2022, 2:31 AM
annotation processing is much more limited, it only able to generate new source code based on existing sources, not modify existing declarations like compiler plugins