Skip to content
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 Build failed with kotlin 2.1.0 because of voyager #522

Open
akardas16 opened this issue Jan 21, 2025 · 7 comments
Open

IOS Build failed with kotlin 2.1.0 because of voyager #522

akardas16 opened this issue Jan 21, 2025 · 7 comments

Comments

@akardas16
Copy link

Voyager Version -> 1.1.0-beta03

Error occurred while optimizing an expression:
CALL 'public abstract fun <set-value> (<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 <get-lastScreenModelKey> (): 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
    $this: GET_VAR 'val this: cafe.adriel.voyager.core.model.ScreenModelStore [val] declared in cafe.adriel.voyager.koin.koinScreenModel' type=cafe.adriel.voyager.core.model.ScreenModelStore origin=null
  <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


java.lang.AssertionError: Error occurred while optimizing an expression:
CALL 'public abstract fun <set-value> (<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 <get-lastScreenModelKey> (): 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
    $this: GET_VAR 'val this: cafe.adriel.voyager.core.model.ScreenModelStore [val] declared in cafe.adriel.voyager.koin.koinScreenModel' type=cafe.adriel.voyager.core.model.ScreenModelStore origin=null
  <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)
	at org.jetbrains.kotlin.ir.interpreter.transformer.IrConstExpressionTransformer.visitCall(IrConstExpressionTransformer.kt:39)
	at org.jetbrains.kotlin.ir.interpreter.transformer.IrConstExpressionTransformer.visitCall(IrConstExpressionTransformer.kt:24)
	at org.jetbrains.kotlin.ir.expressions.IrCall.accept(IrCall.kt:24)
	at org.jetbrains.kotlin.ir.expressions.IrExpression.transform(IrExpression.kt:24)
	at org.jetbrains.kotlin.ir.expressions.IrExpression.transform(IrExpression.kt:20)
	at org.jetbrains.kotlin.ir.util.TransformKt.transformInPlace(transform.kt:35)
	at org.jetbrains.kotlin.ir.expressions.IrContainerExpression.transformChildren(IrContainerExpression.kt:26)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformer$DefaultImpls.visitExpression(IrElementTransformer.kt:99)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitExpression(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformer$DefaultImpls.visitContainerExpression(IrElementTransformer.kt:139)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitContainerExpression(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformer$DefaultImpls.visitBlock(IrElementTransformer.kt:142)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitBlock(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformer$DefaultImpls.visitInlinedFunctionBlock(IrElementTransformer.kt:151)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitInlinedFunctionBlock(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitInlinedFunctionBlock(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.expressions.IrInlinedFunctionBlock.accept(IrInlinedFunctionBlock.kt:24)
	at org.jetbrains.kotlin.ir.expressions.IrExpression.transform(IrExpression.kt:24)
	at org.jetbrains.kotlin.ir.expressions.IrExpression.transform(IrExpression.kt:20)
	at org.jetbrains.kotlin.ir.util.TransformKt.transformInPlace(transform.kt:35)
	at org.jetbrains.kotlin.ir.expressions.IrContainerExpression.transformChildren(IrContainerExpression.kt:26)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformer$DefaultImpls.visitExpression(IrElementTransformer.kt:99)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitExpression(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformer$DefaultImpls.visitContainerExpression(IrElementTransformer.kt:139)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitContainerExpression(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformer$DefaultImpls.visitBlock(IrElementTransformer.kt:142)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitBlock(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformer$DefaultImpls.visitReturnableBlock(IrElementTransformer.kt:148)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitReturnableBlock(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitReturnableBlock(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.expressions.IrReturnableBlock.accept(IrReturnableBlock.kt:23)
	at org.jetbrains.kotlin.ir.expressions.IrExpression.transform(IrExpression.kt:24)
	at org.jetbrains.kotlin.ir.expressions.IrExpression.transform(IrExpression.kt:20)
	at org.jetbrains.kotlin.ir.util.TransformKt.transformInPlace(transform.kt:35)
	at org.jetbrains.kotlin.ir.expressions.IrContainerExpression.transformChildren(IrContainerExpression.kt:26)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformer$DefaultImpls.visitExpression(IrElementTransformer.kt:99)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitExpression(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformer$DefaultImpls.visitContainerExpression(IrElementTransformer.kt:139)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitContainerExpression(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformer$DefaultImpls.visitBlock(IrElementTransformer.kt:142)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitBlock(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitBlock(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.expressions.IrBlock.accept(IrBlock.kt:18)
	at org.jetbrains.kotlin.ir.expressions.IrExpression.transform(IrExpression.kt:24)
	at org.jetbrains.kotlin.ir.expressions.IrReturn.transformChildren(IrReturn.kt:31)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformer$DefaultImpls.visitExpression(IrElementTransformer.kt:99)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitExpression(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformer$DefaultImpls.visitReturn(IrElementTransformer.kt:249)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitReturn(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitReturn(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.expressions.IrReturn.accept(IrReturn.kt:24)
	at org.jetbrains.kotlin.ir.expressions.IrExpression.transform(IrExpression.kt:24)
	at org.jetbrains.kotlin.ir.expressions.IrExpression.transform(IrExpression.kt:20)
	at org.jetbrains.kotlin.ir.util.TransformKt.transformInPlace(transform.kt:35)
	at org.jetbrains.kotlin.ir.expressions.IrContainerExpression.transformChildren(IrContainerExpression.kt:26)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformer$DefaultImpls.visitExpression(IrElementTransformer.kt:99)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitExpression(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformer$DefaultImpls.visitContainerExpression(IrElementTransformer.kt:139)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitContainerExpression(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformer$DefaultImpls.visitBlock(IrElementTransformer.kt:142)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitBlock(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformer$DefaultImpls.visitInlinedFunctionBlock(IrElementTransformer.kt:151)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitInlinedFunctionBlock(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitInlinedFunctionBlock(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.expressions.IrInlinedFunctionBlock.accept(IrInlinedFunctionBlock.kt:24)
	at org.jetbrains.kotlin.ir.expressions.IrExpression.transform(IrExpression.kt:24)
	at org.jetbrains.kotlin.ir.expressions.IrExpression.transform(IrExpression.kt:20)
	at org.jetbrains.kotlin.ir.util.TransformKt.transformInPlace(transform.kt:35)
	at org.jetbrains.kotlin.ir.expressions.IrContainerExpression.transformChildren(IrContainerExpression.kt:26)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformer$DefaultImpls.visitExpression(IrElementTransformer.kt:99)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitExpression(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformer$DefaultImpls.visitContainerExpression(IrElementTransformer.kt:139)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitContainerExpression(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformer$DefaultImpls.visitBlock(IrElementTransformer.kt:142)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitBlock(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformer$DefaultImpls.visitReturnableBlock(IrElementTransformer.kt:148)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitReturnableBlock(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitReturnableBlock(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.expressions.IrReturnableBlock.accept(IrReturnableBlock.kt:23)
	at org.jetbrains.kotlin.ir.expressions.IrExpression.transform(IrExpression.kt:24)
	at org.jetbrains.kotlin.ir.expressions.IrExpression.transform(IrExpression.kt:20)
	at org.jetbrains.kotlin.ir.util.TransformKt.transformInPlace(transform.kt:35)
	at org.jetbrains.kotlin.ir.expressions.IrContainerExpression.transformChildren(IrContainerExpression.kt:26)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformer$DefaultImpls.visitExpression(IrElementTransformer.kt:99)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitExpression(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformer$DefaultImpls.visitContainerExpression(IrElementTransformer.kt:139)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitContainerExpression(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformer$DefaultImpls.visitBlock(IrElementTransformer.kt:142)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitBlock(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitBlock(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.expressions.IrBlock.accept(IrBlock.kt:18)
	at org.jetbrains.kotlin.ir.expressions.IrExpression.transform(IrExpression.kt:24)
	at org.jetbrains.kotlin.ir.expressions.IrTypeOperatorCall.transformChildren(IrTypeOperatorCall.kt:33)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformer$DefaultImpls.visitExpression(IrElementTransformer.kt:99)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitExpression(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformer$DefaultImpls.visitTypeOperator(IrElementTransformer.kt:272)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitTypeOperator(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitTypeOperator(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.expressions.IrTypeOperatorCall.accept(IrTypeOperatorCall.kt:26)
	at org.jetbrains.kotlin.ir.expressions.IrExpression.transform(IrExpression.kt:24)
	at org.jetbrains.kotlin.ir.expressions.IrReturn.transformChildren(IrReturn.kt:31)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformer$DefaultImpls.visitExpression(IrElementTransformer.kt:99)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitExpression(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.visitors.IrElementTransformer$DefaultImpls.visitReturn(IrElementTransformer.kt:249)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitReturn(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.visitors.IrTransformer.visitReturn(IrTransformer.kt:14)
	at org.jetbrains.kotlin.ir.expressions.IrReturn.accept(IrReturn.kt:24)
	at org.jetbrains.kotlin.ir.expressions.IrExpression.transform(IrExpression.kt:24)
	at org.jetbrains.kotlin.ir.expressions.IrExpression.transform(IrExpression.kt:20)
	at org.jetbrains.kotlin.ir.util.TransformKt.transformInPlace(transform.kt:35)
	at org.jetbrains.kotlin.ir.expressions.IrContainerExpression.transformChildren(IrContainerExpression.kt:26)
@akardas16
Copy link
Author

the same issue was already opened in here. I didin't notice

@OlehSalamakha
Copy link

Did you find a way how to fix it?

@esdras-ajulabs
Copy link

Did you find a way how to fix it?

Unfortunately, I am switching to Decompose, which is being really helpful. Voyager is a great library, but seems it is not ready for production in the earlier releases.

@OlehSalamakha
Copy link

But voyager works on desktop, decompose doesn't, as I know.

@esdras-ajulabs
Copy link

But voyager works on desktop, decompose doesn't, as I know.

It does work in Desktop with JVM. Not sure if it works in WASM, but that is in alpha (I guess). https://arkivanov.github.io/Decompose/faq/

@OlehSalamakha
Copy link

On Desktop it only works with mac os, but I need windows support.

@esdras-ajulabs
Copy link

esdras-ajulabs commented Jan 22, 2025

On Desktop it only works with mac os, but I need windows support.

Are you sure? Desktop apps built with Compose run on the JVM, so they should work on Windows, macOS, or even Linux without any issues. Maybe there’s just a setup problem on Windows?

EDIT: Supported multiplatform targets: Android, JVM/Desktop, Native/iOS, Native/macOS, JS/Canvas and JS/Wasm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants