has anyone successfully built the new native memor...
# multiplatform
p
has anyone successfully built the new native memory management model? I've updated kotlin versions, but now end up with build errors around variants
Copy code
Could not determine the dependencies of task ':shared:linkPodDebugFrameworkIosX64'.
> Could not resolve all task dependencies for configuration ':shared:iosX64CompileKlibraries'.
  > Could not resolve project :core:arch.
   Required by:
     project :shared
   > The consumer was configured to find a usage of 'kotlin-api' of a library, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native', attribute 'org.jetbrains.kotlin.native.target' with value 'ios_x64'. However we cannot choose between the following variants of project :core:arch:
     - iosX64ApiElements
     - iosX64CInteropApiElements
     - podDebugFrameworkIosArm64
     - podDebugFrameworkIosFat
     - podDebugFrameworkIosX64
     - podReleaseFrameworkIosArm64
     - podReleaseFrameworkIosFat
     - podReleaseFrameworkIosX64
    All of them match the consumer attributes:
     - Variant 'iosX64ApiElements' capability Multiplatform_Sample.core:arch:1.0 declares a usage of 'kotlin-api' of a library, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'ios_x64', attribute 'org.jetbrains.kotlin.platform.type' with value 'native':
       - Unmatched attributes:
         - Provides attribute 'artifactType' with value 'org.jetbrains.kotlin.klib' but the consumer didn't ask for it
         - Provides attribute 'org.jetbrains.kotlin.localToProject' with value 'public' but the consumer didn't ask for it
     - Variant 'iosX64CInteropApiElements' capability Multiplatform_Sample.core:arch:1.0 declares a usage of 'kotlin-api' of a library, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'ios_x64', attribute 'org.jetbrains.kotlin.platform.type' with value 'native':
       - Unmatched attributes:
         - Provides attribute 'artifactType' with value 'org.jetbrains.kotlin.klib' but the consumer didn't ask for it
         - Provides its elements with the library elements 'cinterop-klib' but the consumer didn't ask for it
         - Provides attribute 'org.jetbrains.kotlin.localToProject' with value 'public' but the consumer didn't ask for it
     - Variant 'podDebugFrameworkIosArm64' capability Multiplatform_Sample.core:arch:1.0 declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native':
       - Unmatched attributes:
         - Provides attribute 'artifactType' with value 'org.jetbrains.kotlin.framework' but the consumer didn't ask for it
         - Doesn't say anything about its component category (required a library)
         - Doesn't say anything about its usage (required a usage of 'kotlin-api')
         - Provides attribute 'org.jetbrains.kotlin.native.build.type' with value 'DEBUG' but the consumer didn't ask for it
         - Provides attribute 'org.jetbrains.kotlin.native.framework.targets' with value '[ios_arm64]' but the consumer didn't ask for it
         - Doesn't say anything about org.jetbrains.kotlin.native.target (required 'ios_x64')
     - Variant 'podDebugFrameworkIosFat' capability Multiplatform_Sample.core:arch:1.0 declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native':
       - Unmatched attributes:
         - Provides attribute 'artifactType' with value 'org.jetbrains.kotlin.framework' but the consumer didn't ask for it
         - Doesn't say anything about its component category (required a library)
         - Doesn't say anything about its usage (required a usage of 'kotlin-api')
         - Provides attribute 'org.jetbrains.kotlin.native.build.type' with value 'DEBUG' but the consumer didn't ask for it
         - Provides attribute 'org.jetbrains.kotlin.native.framework.targets' with value '[ios_arm64, ios_x64]' but the consumer didn't ask for it
         - Doesn't say anything about org.jetbrains.kotlin.native.target (required 'ios_x64')
     - Variant 'podDebugFrameworkIosX64' capability Multiplatform_Sample.core:arch:1.0 declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native':
       - Unmatched attributes:
         - Provides attribute 'artifactType' with value 'org.jetbrains.kotlin.framework' but the consumer didn't ask for it
         - Doesn't say anything about its component category (required a library)
         - Doesn't say anything about its usage (required a usage of 'kotlin-api')
         - Provides attribute 'org.jetbrains.kotlin.native.build.type' with value 'DEBUG' but the consumer didn't ask for it
         - Provides attribute 'org.jetbrains.kotlin.native.framework.targets' with value '[ios_x64]' but the consumer didn't ask for it
         - Doesn't say anything about org.jetbrains.kotlin.native.target (required 'ios_x64')
     - Variant 'podReleaseFrameworkIosArm64' capability Multiplatform_Sample.core:arch:1.0 declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native':
:shared is my main KMM module, corearch is another module with interface definitions and my "CFlow" implementation
this was compiling against kotlin 1.5.30/coroutines-core1.5.30 mt/ktor1.6.3, but I've updated to kotlin 1.6.0-M1-139/coroutines-core1.5.1 new mm dev2/ktor1.6.2-native-mm-eap-196
j
I'm not sure about specific errors you're seeing but if it helps I was able to try using it in following branch https://github.com/joreilly/MortyComposeKMM/tree/new_kotlinnative_memorymodel
p
cool, thanks, i'll poke around at your build files
j
this was commit with the changes I made (a little complicated by fact that I'm using different Kotlin version for Compose Android app (which still needs 1.5.21) and the iOS app) https://github.com/joreilly/MortyComposeKMM/commit/65355fd01abb13164f87364c8b91cb93f9b91bed
p
i think I may have run into this: https://youtrack.jetbrains.com/issue/KT-48370