xxfast
03/06/2023, 11:30 PMparcelize-darwin
plugin. Any clue as to whats causing this issue?
> Task :core:compileKotlinIosSimulatorArm64 FAILED
e: Compilation failed: Front-end Internal error: Failed to analyze declaration BackgroundWorkData
File being compiled: (5,1) in BackgroundWorkers.kt
The root cause java.lang.NoClassDefFoundError was thrown at: com.arkivanov.parcelize.darwin.ParcelizeResolveExtension.generateSyntheticClasses(ParcelizeResolveExtension.kt:13)
* Source files: ..
* Compiler version info: Konan: 1.8.10 / Kotlin: 1.8.10
* Output kind: LIBRARY
e: org.jetbrains.kotlin.util.KotlinFrontEndException: Front-end Internal error: Failed to analyze declaration BackgroundWorkData
File being compiled: (5,1) in BackgroundWorkers.kt
The root cause java.lang.NoClassDefFoundError was thrown at: com.arkivanov.parcelize.darwin.ParcelizeResolveExtension.generateSyntheticClasses(ParcelizeResolveExtension.kt:13)
Arkadii Ivanov
03/07/2023, 9:17 AMxxfast
03/07/2023, 11:14 PMxxfast
03/07/2023, 11:25 PM> Task :app:ui:linkPodDebugFrameworkIosSimulatorArm64
Showing All Messages
e: Module "PSCore.core:ui" has a reference to symbol [ au.com.gridstone.pscore.core.ui.navigation/rememberRouter|-3103101331561201202[0] <- local Local[<TP>,0 | TYPE_PARAMETER name:C index:0 variance: superTypes:[com.arkivanov.parcelize.darwin.Parcelable{ com.arkivanov.essenty.parcelable.Parcelable }] reified:false] ]. Neither the module itself nor its dependencies contain such declaration.
my :app:ui
and :core:ui
modules does have this
listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64(),
).forEach { targets ->
targets.binaries {
framework {
export(Arkivanov.parcelzieDarwinRuntime)
}
}
}
so not sure why it is not seeing the dependency.Arkadii Ivanov
03/08/2023, 12:51 AMArkadii Ivanov
03/08/2023, 12:54 AMxxfast
03/08/2023, 12:55 AMxxfast
03/09/2023, 4:52 AM1.0.0-compose-experimental
with
• Kotlin: 1.8.10
• Essenty: 1.0.0
• 0.1.3
1.3.1-rc02
> Task :app:ui:linkPodDebugFrameworkIosSimulatorArm64
e: Module "PSCore.core:ui" has a reference to symbol [ au.com.gridstone.pscore.core.ui.navigation/rememberRouter|-3103101331561201202[0] <- local Local[<TP>,0 | TYPE_PARAMETER name:C index:0 variance: superTypes:[com.arkivanov.parcelize.darwin.Parcelable{ com.arkivanov.essenty.parcelable.Parcelable }] reified:false] ]. Neither the module itself nor its dependencies contain such declaration.
This could happen if the required dependency is missing in the project. Or if there is a dependency of "PSCore.core:ui" that has a different version in the project than the version that "PSCore.core:ui" was initially compiled with. Please check that the project configuration is correct and has consistent versions of all required dependencies.
The list of "PSCore.core:ui" dependencies that may lead to conflicts:
1. "PSCore:core" (a library with unknown version)
2. "app.cash.molecule:molecule-runtime" (a library with unknown version)
3. "co.touchlab:kermit" (a library with unknown version)
4. "co.touchlab:stately-common" (a library with unknown version)
5. "co.touchlab:stately-concurrency" (a library with unknown version)
6. "com.arkivanov.decompose:decompose (com.arkivanov.decompose:decompose-iossimulatorarm64): 1.0.0-compose-experimental" (was initially compiled with "com.arkivanov.decompose:decompose (com.arkivanov.decompose:decompose-iossimulatorarm64)")
7. "com.arkivanov.decompose:extensions-compose-jetbrains (com.arkivanov.decompose:extensions-compose-jetbrains-iossimulatorarm64): 1.0.0-compose-experimental" (was initially compiled with "com.arkivanov.decompose:extensions-compose-jetbrains (com.arkivanov.decompose:extensions-compose-jetbrains-iossimulatorarm64)")
8. "com.arkivanov.essenty:back-handler (com.arkivanov.essenty:back-handler-iossimulatorarm64): 1.0.0" (was initially compiled with "com.arkivanov.essenty:back-handler (com.arkivanov.essenty:back-handler-iossimulatorarm64)")
9. "com.arkivanov.essenty:instance-keeper (com.arkivanov.essenty:instance-keeper-iossimulatorarm64): 1.0.0" (was initially compiled with "com.arkivanov.essenty:instance-keeper (com.arkivanov.essenty:instance-keeper-iossimulatorarm64)")
10. "com.arkivanov.essenty:lifecycle (com.arkivanov.essenty:lifecycle-iossimulatorarm64): 1.0.0" (was initially compiled with "com.arkivanov.essenty:lifecycle (com.arkivanov.essenty:lifecycle-iossimulatorarm64)")
11. "com.arkivanov.essenty:parcelable (com.arkivanov.essenty:parcelable-iossimulatorarm64): 1.0.0" (was initially compiled with "com.arkivanov.essenty:parcelable (com.arkivanov.essenty:parcelable-iossimulatorarm64)")
12. "com.arkivanov.essenty:state-keeper (com.arkivanov.essenty:state-keeper-iossimulatorarm64): 1.0.0" (was initially compiled with "com.arkivanov.essenty:state-keeper (com.arkivanov.essenty:state-keeper-iossimulatorarm64)")
13. "com.arkivanov.essenty:utils-internal (com.arkivanov.essenty:utils-internal-iossimulatorarm64): 1.0.0" (was initially compiled with "com.arkivanov.essenty:utils-internal (com.arkivanov.essenty:utils-internal-iossimulatorarm64)")
14. "com.arkivanov.parcelize.darwin:runtime (com.arkivanov.parcelize.darwin:runtime-iossimulatorarm64): 0.1.3" (was initially compiled with "com.arkivanov.parcelize.darwin:runtime (com.arkivanov.parcelize.darwin:runtime-iossimulatorarm64)")
Let me know if anything looks off - either way i'll get a reproducer out soonArkadii Ivanov
03/09/2023, 7:47 AMArkadii Ivanov
03/09/2023, 7:50 AMxxfast
03/09/2023, 7:51 AMArkadii Ivanov
03/09/2023, 7:53 AMxxfast
03/09/2023, 7:54 AM:core:ui
module and consumed by :app:ui
moduleArkadii Ivanov
03/09/2023, 7:55 AMArkadii Ivanov
03/09/2023, 7:58 AMArkadii Ivanov
03/09/2023, 8:02 AMxxfast
03/10/2023, 2:52 AMShortly: The required symbol [ io.github.xxfast.krouter/rememberRouter|-3103101331561201202[0] <- local Local[<TP>,0 | TYPE_PARAMETER name:C index:0 variance: superTypes:[com.arkivanov.parcelize.darwin.Parcelable{ com.arkivanov.essenty.parcelable.Parcelable }] reified:false] ] is missing in the module or module dependencies. This could happen if the required dependency is missing in the project. Or if there is a dependency that has a different version (without the required symbol) in the project than the version (with the required symbol) that the module was initially compiled with.
had no luck with making rememberRouter{}
not inline
/ removing the default arguments 😕 Yeah you are right this most definitely looks like a compose-jb issueArkadii Ivanov
03/10/2023, 9:22 AMArkadii Ivanov
03/14/2023, 11:00 PMrememberRouter
function not inlined fixes the issue (and then the same issue happens with rememberViewModel
). As a workaround, instead of reified C
you can pass KClass<out C>
.
However, inlined functions worked fine for me. Most likely because I don't export the whole shared module to iOS. Instead, I have a separate tiny module for Compose iOS app. This module just integrates the root component and UI from the shared module, without exposing it I guess.xxfast
03/15/2023, 12:50 AMMost likely because I don't export the whole shared module to iOS. Instead, I have a separate tiny module for Compose iOS appDo you mean something like this? Still seem to run into the same issue even then 🤔 let me try removing the inlines
xxfast
03/15/2023, 4:15 AMLazyGrids
) so this definitely has nothing to do with decomposexxfast
03/15/2023, 4:16 AMArkadii Ivanov
03/15/2023, 8:20 AMxxfast
03/20/2023, 10:16 PMArkadii Ivanov
03/20/2023, 10:41 PM