-
-
Notifications
You must be signed in to change notification settings - Fork 143
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
iOS Doesn't build with kotlin 2.1.0 and voyager 1.1.0-beta03 or lower #515
Comments
I updated kotlin to 2.1.0 in #514 |
@zeeshanali-k Removing the voyager koin dependency and recreating the koinScreenModel(...) function will fix your issue
@dzmpr Your branch does not fix the issue |
I'm not intended to fix this problem. @zeeshanali-k requested to update kotlin in project and I just highlighted that this was done in my PR. |
I came across a similar problem and the issue was solved by increasing the available heap size for gradle builds, e.g. in gradle.properties:
|
Same issue here, here is the stacktrace Showing All Messages CALL 'public abstract fun (<set-?>: T of kotlinx.coroutines.flow.MutableStateFlow): kotlin.Unit declared in kotlinx.coroutines.flow.MutableStateFlow' type=kotlin.Unit origin=EQ $this: CALL 'internal final fun (): kotlinx.coroutines.flow.MutableStateFlow<kotlin.String?{ cafe.adriel.voyager.core.model.ScreenModelKey? }> declared in cafe.adriel.voyager.core.model.ScreenModelStore' type=kotlinx.coroutines.flow.MutableStateFlow<kotlin.String?{ cafe.adriel.voyager.core.model.ScreenModelKey? }> origin=GET_PROPERTY
<set-?>: GET_VAR 'val key: kotlin.String{ cafe.adriel.voyager.core.model.ScreenModelKey } [val] declared in cafe.adriel.voyager.koin.koinScreenModel' type=kotlin.String{ cafe.adriel.voyager.core.model.ScreenModelKey } origin=null
at org.jetbrains.kotlin.ir.interpreter.transformer.IrConstEvaluationContext.canBeInterpreted(IrConstEvaluationContext.kt:74)
Caused by: java.lang.IllegalStateException: Parent of this declaration is not a class: CONSTRUCTOR MISSING_DECLARATION visibility:public <> () returnType:kotlin.Nothing
|
same here problem in android so far ok |
Any updates on it? iOS build is blocked with these versions. |
@esdras-ajulabs there is a workaround in #515 (comment) |
@edgarsMalahovskis why not fix this inside library itself instead of manual create own class? is there difficult or blocking to update the library? |
@hafiz013 I agree with you, but people need to work while this library is updated, so there is a workaround. Not saying that this should not be fixed. |
When I set my KMP project's Kotlin version to 2.1.0 and then run the iOS build I get following error, although if I set the kotlin version to lower than that like 2.0.21, everything works fine.
Also setting cacheKind=none doesn't work.
So please support Kotlin 2.1.0 ASAP, as the lower versions of kotlin don't support the latest xcode, so I am currently using xcode 15 and often switching between 16 and 15. Just because of this voyager error.
error: Failed to build cache for /{root}/.gradle/caches/modules-2/files-2.1/cafe.adriel.voyager/voyager-koin-iossimulatorarm64/1.1.0-beta03/5b6d910be8bdced3277bf6e86300f0790ddc4209/voyager-koin.
As a workaround, please try to disable compiler caches (kotlin.native.cacheKind=none)
The text was updated successfully, but these errors were encountered: