-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
org.jetbrains.kotlin.util.KotlinFrontEndException: Front-end Internal error: Failed to analyze declaration #339
Comments
I've created a new minimal project from the KMM plugin in Android studio that replicates the error: https://github.com/iamsteveholmes/RealmMVIKotlinTest Here is the only code I created and it replicates the problem:
|
Hi @iamsteveholmes thanks for reporting this. I can reproduce the issue, this is a bug in the compiler plugin that needs to be investigated, basically there's a recursion when trying to resolve companion object of package com.example.realmmvikotlintest
import com.arkivanov.mvikotlin.core.store.Store
sealed class Intent {
object Loaded : Intent()
}
data class State(
val characters: List<Character> = emptyList()
)
interface CharacterListStore : Store<Intent, State, Nothing> {
}
data class Character(val id: Long) |
Thanks @nhachicha! Curiously I didn't get your message and popped on to let you know I figured that out 😊. This does, however, create.a naming issue with iOS. Essentially all the inner classes have to be renamed so as not to create conflicts resulting in weird names. But I'm going with the workaround for now. |
The minimal model definition to trigger this is
Haven't found a way to test if |
Hi. I got this error after migrate build.gradle to kotlin in my android project |
Is there any update on this error? We try to use "mvi" in our project, when we use inner classes to define Store, we will encounter this problem. We need your help!😊 @rorbech @nhachicha |
Hi @Charon1997 Just be sure. Is there something preventing you from moving the Store outside the class? Or is it autogenerated for you? Currently, this is problematic to implement due to how the Kotlin Compiler runs. You can see more details here: https://kotlinlang.slack.com/archives/C7L3JB43G/p1626430519160400 |
@iamsteveholmes What was your solution? My workaround is to
|
hi,我已经收到你的邮件了,我会尽快查看的~
|
Hi All!
I tried adding Realm to my current project and it failed to build with the following stacktrace:
Here is the offending class:
The text was updated successfully, but these errors were encountered: