Closed eymar closed 1 year ago
This also happens when I reference pretty much anything in the androidx.compose.foundation.lazy.grid package in a source set that's depended upon by an iOS target:
e: Module "org.jetbrains.compose.foundation:foundation" has a reference to symbol [ File '/opt/buildAgent/work/ba60555d9dde92ae/compose/frameworks/support/compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazyGridLayoutInfo.kt' <- androidx.compose.foundation.lazy.grid/EmptyLazyGridLayoutInfo|null[0] ]. 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 "org.jetbrains.compose.foundation:foundation" that has a different version in the project than the version that "org.jetbrains.compose.foundation:foundation" was initially compiled with. Please check that the project configuration is correct and has consistent versions of all required dependencies.
The list of "org.jetbrains.compose.foundation:foundation" dependencies that may lead to conflicts:
1. "org.jetbrains.compose.animation:animation" (a library with unknown version)
2. "org.jetbrains.compose.animation:animation-core" (a library with unknown version)
3. "org.jetbrains.compose.foundation:foundation-layout" (a library with unknown version)
4. "org.jetbrains.compose.runtime:runtime" (a library with unknown version)
5. "org.jetbrains.compose.runtime:runtime-saveable" (a library with unknown version)
6. "org.jetbrains.compose.ui:ui" (a library with unknown version)
7. "org.jetbrains.compose.ui:ui-geometry" (a library with unknown version)
8. "org.jetbrains.compose.ui:ui-graphics" (a library with unknown version)
9. "org.jetbrains.compose.ui:ui-text" (a library with unknown version)
10. "org.jetbrains.compose.ui:ui-unit" (a library with unknown version)
11. "org.jetbrains.compose.ui:ui-util" (a library with unknown version)
12. "org.jetbrains.skiko:skiko" (a library with unknown version)
13. "stdlib: 1.7.10" (was initially compiled with "stdlib: 1.6.21")
14. "org.jetbrains.kotlin.native.platform.CoreFoundation: 1.7.10" (was initially compiled with "org.jetbrains.kotlin.native.platform.CoreFoundation: 1.6.21")
15. "org.jetbrains.kotlin.native.platform.CoreGraphics: 1.7.10" (was initially compiled with "org.jetbrains.kotlin.native.platform.CoreGraphics: 1.6.21")
16. "org.jetbrains.kotlin.native.platform.CoreImage: 1.7.10" (was initially compiled with "org.jetbrains.kotlin.native.platform.CoreImage: 1.6.21")
17. "org.jetbrains.kotlin.native.platform.CoreText: 1.7.10" (was initially compiled with "org.jetbrains.kotlin.native.platform.CoreText: 1.6.21")
18. "org.jetbrains.kotlin.native.platform.CoreVideo: 1.7.10" (was initially compiled with "org.jetbrains.kotlin.native.platform.CoreVideo: 1.6.21")
19. "org.jetbrains.kotlin.native.platform.EAGL: 1.7.10" (was initially compiled with "org.jetbrains.kotlin.native.platform.EAGL: 1.6.21")
20. "org.jetbrains.kotlin.native.platform.Foundation: 1.7.10" (was initially compiled with "org.jetbrains.kotlin.native.platform.Foundation: 1.6.21")
21. "org.jetbrains.kotlin.native.platform.IOSurface: 1.7.10" (was initially compiled with "org.jetbrains.kotlin.native.platform.IOSurface: 1.6.21")
22. "org.jetbrains.kotlin.native.platform.ImageIO: 1.7.10" (was initially compiled with "org.jetbrains.kotlin.native.platform.ImageIO: 1.6.21")
23. "org.jetbrains.kotlin.native.platform.Metal: 1.7.10" (was initially compiled with "org.jetbrains.kotlin.native.platform.Metal: 1.6.21")
24. "org.jetbrains.kotlin.native.platform.OpenGLESCommon: 1.7.10" (was initially compiled with "org.jetbrains.kotlin.native.platform.OpenGLESCommon: 1.6.21")
25. "org.jetbrains.kotlin.native.platform.QuartzCore: 1.7.10" (was initially compiled with "org.jetbrains.kotlin.native.platform.QuartzCore: 1.6.21")
26. "org.jetbrains.kotlin.native.platform.Security: 1.7.10" (was initially compiled with "org.jetbrains.kotlin.native.platform.Security: 1.6.21")
27. "org.jetbrains.kotlin.native.platform.UIKit: 1.7.10" (was initially compiled with "org.jetbrains.kotlin.native.platform.UIKit: 1.6.21")
28. "org.jetbrains.kotlin.native.platform.UserNotifications: 1.7.10" (was initially compiled with "org.jetbrains.kotlin.native.platform.UserNotifications: 1.6.21")
29. "org.jetbrains.kotlin.native.platform.darwin: 1.7.10" (was initially compiled with "org.jetbrains.kotlin.native.platform.darwin: 1.6.21")
30. "org.jetbrains.kotlin.native.platform.posix: 1.7.10" (was initially compiled with "org.jetbrains.kotlin.native.platform.posix: 1.6.21")
31. "org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iosx64): 0.17.3" (was initially compiled with "org.jetbrains.kotlinx:atomicfu (org.jetbrains.kotlinx:atomicfu-iosx64)")
32. "org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iosx64): 1.6.4" (was initially compiled with "org.jetbrains.kotlinx:kotlinx-coroutines-core (org.jetbrains.kotlinx:kotlinx-coroutines-core-iosx64)")
Can confirm that simply commenting out those references results in a successful build / run (not a workaround since I'm just omitting a portion of the UI). Hopefully this helps!
reproduced also with older versions (didn't find a version where it worked) when using androidx.compose.foundation.lazy.grid.LazyGridState
anywhere in the source code.
the change in androidx/compose that revealed the issue:
LazyGridLayoutInfo was interface, but became sealed interface
- interface LazyGridLayoutInfo {
+ sealed interface LazyGridLayoutInfo {
I believe this is fixed as of 1.2.0-beta01
.
Fixed
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.
Originally reported here: https://kotlinlang.slack.com/archives/C01F2HV7868/p1660836369631249
Reproducer: https://github.com/OliverO2/compose-web-canvas-symbol-missing