MrPowerGamerBR
11/25/2022, 8:01 PMjsBrowserProductionWebpack
MrPowerGamerBR
11/25/2022, 8:02 PMtasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions {
// Live Literals seems to be only used for hot reloading in dev mode, but Compose Web doesn't support hot reload yet
freeCompilerArgs += listOf(
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:liveLiterals=false",
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:liveLiteralsEnabled=false"
)
}
}
Which is easier than prepending all of the files in your module with @file:NoLiveLiterals
MrPowerGamerBR
11/25/2022, 8:08 PMDima Avdeev
11/29/2022, 9:52 AMOleksandr Karpovich [JB]
11/29/2022, 10:12 AMMrPowerGamerBR
11/29/2022, 3:33 PMCaused by: java.lang.IllegalStateException: Duplicate live literal key found: String$fun-prepareSave$class-SaveStuff
Caused by element at: C:/Users/Leonardo/IdeaProjects/LorittaBot/DeviousLoritta/web/spicy-morenitta/src/jsMain/kotlin/SaveStuff.kt:41:22
If you encounter this error, please file a bug at <https://issuetracker.google.com/issues?q=componentid:610764>
Try adding the `@NoLiveLiterals` annotation around the surrounding code to avoid this exception.
Yes, I know, that class is a super weird mess, this code is from ~2019 so I may have done some... questionable decisions when making it (using jQuery lol)
Keep in mind that technically the version on the repository is not "up to date" yet, since I haven't committed my local changes (updated the module from LEGACY to IR, updated the classes to work with the IR compiler, added Compose to the module, etc)Oleksandr Karpovich [JB]
11/29/2022, 4:15 PM