Splitties / WffDsl

Kotlin DSL to generate XML based Watch Face Format for Wear OS : https://developer.android.com/training/wearables/wff/watch-face
Apache License 2.0
18 stars 4 forks source link

Compilation Error on large watchface #19

Open yschimke opened 7 months ago

yschimke commented 7 months ago

I can refactor, but reporting this as it was confusing

exception: exception: java.lang.RuntimeException: Error generating class file xxx.class (compiled from [/Users/yschimke/StudioProjects/xxx]): Method too large: xxxx.xxx (Lsplitties/wff/WatchFaceDsl;)Ljava/lang/Object;
exception:  at org.jetbrains.kotlin.codegen.ClassFileFactory$OutputClassFile.asByteArray(ClassFileFactory.java:310)
exception:  at org.jetbrains.kotlin.cli.common.output.OutputUtilsKt.writeAll(outputUtils.kt:33)
exception:  at org.jetbrains.kotlin.cli.common.output.OutputUtilsKt.writeAllTo(outputUtils.kt:47)
exception:  at org.jetbrains.kotlin.cli.common.output.OutputUtilsKt.writeAll(outputUtils.kt:52)
LouisCAD commented 7 months ago

Weird. I'm wondering if K2 will have the same limitation.

Out of curiosity, how many LoC is the problematic method?

yschimke commented 7 months ago

750 for entire file including imports