Thread
#compose
    g

    gitai

    1 year ago
    How can you view a composable function source code after the compiler plugin edits?
    Big Chungus

    Big Chungus

    1 year ago
    Decompile .class files in idea?
    g

    gitai

    1 year ago
    if you mean tools->Kotlin->Show Kotlin Byte Code, then no its not supported
    Caused by: java.lang.IllegalStateException: Couldn't obtain compiled function body for @androidx.compose.runtime.Composable public inline fun Column(modifier: ...
    gildor

    gildor

    1 year ago
    You can get .class file from Gradle build dir and decompile it
    g

    gitai

    1 year ago
    I wonder if there is some debug flag that can show the transformed source code during compilation before compiling to byte code...
    Oddly AS decompile shows only function signatures when decompiling   ../app/build/tmp/kotlin-classes/debug/com/example/myapp4/MainActivityKt.class   And nothing for other generated files in the directory
    d

    Daniel

    1 year ago
    The compose team has a test helper that translates to pseudocode. You can see it used in the YouTube videos by Leland Richardson where he works on the compose compiler.
    g

    gitai

    1 year ago
    @Daniel Thanks, found them.