PatilShreyas / compose-report-to-html

A utility (Gradle Plugin + CLI) to convert Jetpack Compose compiler metrics and reports to beautified HTML page.
https://patilshreyas.github.io/compose-report-to-html/
MIT License
383 stars 9 forks source link

Report Generation for Composables fails on dirty content generated by the compiler #25

Closed PatilShreyas closed 1 year ago

PatilShreyas commented 1 year ago

Sometimes, compose compiler generates this kind of content in -composables.txt metric, which then this utility's parser fails to parse.

 stable itemContent: Function3<User, Composer, Int, Unit>? = @static composableLambda($composer, 1578247068, true) { user: User, $composer: Composer?, $changed: Int ->
  sourceInformation  (  $composer  ,   "C43@1680L140:UserList.kt#9ot79p"  )  
  val   $dirty   =   $changed  
  if (  $changed   and   0b1110   ===   0  ) {
    $dirty     =     $dirty     or     if (    $composer    .    changed    (    user    )    )     0b0100     else     0b0010
  }

  if (  $dirty   and   0b01011011   !==   0b00010010   ||   !  $composer  .  skipping  ) {
    if (    isTraceInProgress    (    )    ) {
      traceEventStart      (      1578247068      ,       $dirty      ,       -1      ,       "com.example.android.UsersList.<anonymous> (UserList.kt:42)"      )
    }

    DefaultUser    (    user    ,     onUserSelected    ,     expanded    ,     $composer    ,     0b1110     and     $dirty     or     0b01110000     and     $dirty     shr     0b0110     or     0b001110000000     and     $dirty    )    
    if (    isTraceInProgress    (    )    ) {
      traceEventEnd      (      )
    }

  } else {
    $composer    .    skipToGroupEnd    (    )
  }
PatilShreyas commented 1 year ago

Fixed and released in v1.0.0-beta02