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

Conflict with Apollo GraphQL #42

Closed leffsu closed 1 year ago

leffsu commented 1 year ago

Greetings! Thank you for this amazing library but I can't seem to get it working in project with Apollo GraphQL (AppSync SDK).

Getting the following error executing devDebugComposeCompilerHtmlReport:

Cannot serialize Kotlin type com.apollographql.apollo.compiler.ir.CodeGenerationIR. Reflective serialization of Kotlin classes without using kotlin-reflect has undefined and unexpected behavior. Please use KotlinJsonAdapterFactory from the moshi-kotlin artifact or use code gen from the moshi-kotlin-codegen artifact.

Could you attempt to use KotlinJsonAdapterFactory or allow us to configure if we want to use Moshi or Gson?

Thank you!

PatilShreyas commented 1 year ago

Thanks @leffsu for raising this issue. We'll definitely fix this issue on priority. Meanwhile, could you please how to reproduce this or if you can share a sample project, that would be a great help.

leffsu commented 1 year ago

Sure, @PatilShreyas! https://github.com/leffsu/Compose_Metrics_report_Issue

New Android Studio create project flow is a mess so it worked for me with JDK 17 but 13 should work fine too. Running debugComposeCompilerHtmlReport produces the same error.

Re-download dependencies and sync project (requires network) button doesn't help.

PatilShreyas commented 1 year ago

Thanks, @leffsu for sharing the sample. It's easy to test this issue very quickly due to this. It's been fixed in v1.0.1.