JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
16.33k stars 1.18k forks source link

Function 'getKoin' can not be called: No function found for symbol #4361

Closed maqsats closed 9 months ago

maqsats commented 9 months ago

Bug I cannot build a web version, after upgrading to 1.6.0-rc03.

Affected platforms

Versions

To Reproduce

  1. Run the project with "koin" dependency and upgrade to 1.6.0-rc03

Uncaught runtime errors:

ERROR Function 'getKoin' can not be called: No function found for symbol 'org.koin.compose/getKoin|getKoin(androidx.compose.runtime.Composer?;kotlin.Int){}[0]' IrLinkageError: Function 'getKoin' can not be called: No function found for symbol 'org.koin.compose/getKoin|getKoin(androidx.compose.runtime.Composer?;kotlin.Int){}[0]' at throwLinkageError (webpack-internal:///./kotlin/kotlin-kotlin-stdlib.js:7106:11) at protoOf.Content_a1ofyo_k$ (webpack-internal:///./kotlin/DNAPaymentsKMP-composeApp.js:57127:7) at ComposableSingletons$SlideTransitionKt$lambda_1$lambda_40c7b8 (webpack-internal:///./kotlin/DNAPaymentsKMP-composeApp.js:120641:8) at protoOf.invoke_gk4tfu_k$ (webpack-internal:///./kotlin/compose-multiplatform-core-compose-runtime-runtime.js:38375:92) at Object.eval [as _v] (webpack-internal:///./kotlin/DNAPaymentsKMP-composeApp.js:120633:25) at eval (webpack-internal:///./kotlin/DNAPaymentsKMP-composeApp.js:120490:18) at protoOf.invoke_z8di7s_k$ (webpack-internal:///./kotlin/compose-multiplatform-core-compose-runtime-runtime.js:38347:92) at eval (webpack-internal:///./kotlin/DNAPaymentsKMP-composeApp.js:120506:25) at CompositionLocalProvider_0 (webpack-internal:///./kotlin/compose-multiplatform-core-compose-runtime-runtime.js:7526:5) at protoOf.SaveableStateProvider_3h7wny_k$ (webpack-internal:///./kotlin/compose-multiplatform-core-compose-runtime-runtime-saveable.js:598:5)

dima-avdeev-jb commented 9 months ago

org.koin.compose/getKoin it is not a Compose package and function. Look's like it is compiler related Issue. Are this bug happends only in JS and Wasm?

@HahhVwgwg Can you please create a minimal reproducible sample project of this bug on GitHub?

HLCaptain commented 9 months ago

I would recommend you to upgrade Koin to version 3.6.0-wasm-alpha2. It should support Wasm and JS target better. It works for me using Compose Multiplatform 1.6.0-rc03. Project: new commit with updated dependencies will be here.

dima-avdeev-jb commented 9 months ago

@HahhVwgwg I will close this Issue because it is not related to Compose Multiplatform. Please ask Koin developers for help. But fill free to reopen it if you will have additional questions.

maqsats commented 9 months ago

@dima-avdeev-jb Sorry for the late reply, it was due to some library not due to compose multiplatform itself. Thank you for the help

okushnikov commented 3 months ago

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.