Anyone else having problem with Kotest 6.2.0 and K...
# kotest
s
Anyone else having problem with Kotest 6.2.0 and KMP macOS targets? Gradle complains about
The consumer was configured to find a library for use during 'kotlin-api', preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.klib.packaging' with value 'non-packed', attribute 'org.jetbrains.kotlin.native.target' with value 'macos_x64', attribute 'org.jetbrains.kotlin.platform.type' with value 'native' but:
...
More of Gradle concise (🙄) error message:
Copy code
> No matching variant of io.kotest:kotest-assertions-core:6.2.0 was found. The consumer was configured to find a library for use during 'kotlin-api', preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.klib.packaging' with value 'non-packed', attribute 'org.jetbrains.kotlin.native.target' with value 'macos_x64', attribute 'org.jetbrains.kotlin.platform.type' with value 'native' but:
          - Variant 'androidNativeArm64ApiElements-published' declares a library for use during 'kotlin-api', preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native':
              - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'android_arm64' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'macos_x64'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.klib.packaging (required 'non-packed')
          - Variant 'androidNativeArm64SourcesElements-published' declares a component, preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native':
              - Incompatible because this component declares documentation for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.native.target' with value 'android_arm64' and the consumer needed a library for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.native.target' with value 'macos_x64'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.klib.packaging (required 'non-packed')
          - Variant 'androidNativeX64ApiElements-published' declares a library for use during 'kotlin-api', preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native':
              - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'android_x64' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'macos_x64'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.klib.packaging (required 'non-packed')
          - Variant 'androidNativeX64SourcesElements-published' declares a component, preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native':
              - Incompatible because this component declares documentation for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.native.target' with value 'android_x64' and the consumer needed a library for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.native.target' with value 'macos_x64'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.klib.packaging (required 'non-packed')
          - Variant 'androidNativeX86ApiElements-published' declares a library for use during 'kotlin-api', preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native':
              - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'android_x86' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'macos_x64'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.klib.packaging (required 'non-packed')
          - Variant 'androidNativeX86SourcesElements-published' declares a component, preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native':
              - Incompatible because this component declares documentation for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.native.target' with value 'android_x86' and the consumer needed a library for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.native.target' with value 'macos_x64'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.klib.packaging (required 'non-packed')
          - Variant 'iosArm64ApiElements-published' declares a library for use during 'kotlin-api', preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native':
              - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'ios_arm64' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'macos_x64'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.klib.packaging (required 'non-packed')
          - Variant 'iosArm64MetadataElements-published' declares a library, preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native':
              - Incompatible because this component declares a component for use during 'kotlin-metadata', as well as attribute 'org.jetbrains.kotlin.native.target' with value 'ios_arm64' and the consumer needed a component for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.native.target' with value 'macos_x64'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.klib.packaging (required 'non-packed')
          - Variant 'iosArm64SourcesElements-published' declares a component, preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native':
              - Incompatible because this component declares documentation for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.native.target' with value 'ios_arm64' and the consumer needed a library for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.native.target' with value 'macos_x64'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.klib.packaging (required 'non-packed')
          - Variant 'iosSimulatorArm64ApiElements-published' declares a library for use during 'kotlin-api', preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native':
              - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'ios_simulator_arm64' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'macos_x64'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.klib.packaging (required 'non-packed')
          - Variant 'iosSimulatorArm64MetadataElements-published' declares a library, preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native':
              - Incompatible because this component declares a component for use during 'kotlin-metadata', as well as attribute 'org.jetbrains.kotlin.native.target' with value 'ios_simulator_arm64' and the consumer needed a component for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.native.target' with value 'macos_x64'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.klib.packaging (required 'non-packed')
          - Variant 'iosSimulatorArm64SourcesElements-published' declares a component, preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native':
              - Incompatible because this component declares documentation for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.native.target' with value 'ios_simulator_arm64' and the consumer needed a library for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.native.target' with value 'macos_x64'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.klib.packaging (required 'non-packed')
          - Variant 'iosX64ApiElements-published' declares a library for use during 'kotlin-api', preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native':
              - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'ios_x64' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'macos_x64'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.klib.packaging (required 'non-packed')
          - Variant 'iosX64MetadataElements-published' declares a library, preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native':
              - Incompatible because this component declares a component for use during 'kotlin-metadata', as well as attribute 'org.jetbrains.kotlin.native.target' with value 'ios_x64' and the consumer needed a component for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.native.target' with value 'macos_x64'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.klib.packaging (required 'non-packed')
          - Variant 'iosX64SourcesElements-published' declares a component, preferably optimized for non-jvm, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native':
              - Incompatible because this component declares documentation for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.native.target' with value 'ios_x64' and the consumer needed a library for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.native.target' with value 'macos_x64'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.klib.packaging (required 'non-packed')
          - Variant 'jsApiElements-published' declares a library for use during 'kotlin-api', preferably optimized for non-jvm:
              - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
              - Other compatible attributes:
                  - Doesn't say anything about org.jetbrains.kotlin.klib.packaging (required 'non-packed')
                  - Doesn't say anything about org.jetbrains.kotlin.native.target (required 'macos_x64')
          - Variant 'jsRuntimeElements-published' declares a library, preferably optimized for non-jvm:
              - Incompatible because this component declares a component for use during 'kotlin-runtime', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js' and the consumer needed a component for use during 'kotlin-api', as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
Copilot says:
The log shows the actual failing task is:
•
:api:v1:api-v1-client:compileTestKotlinMacosX64
and the root problem is:
•
Could not resolve all files for configuration ':api:v1:api-v1-client:macosX64TestCompileKlibraries'
•
Configuration cache state could not be cached... field libraries$delegate ... KotlinNativeCompile
But the suggested fix to disable Gradle's configuration cache is not really an option for me.
a
We have removed those targets as we upgraded some dependencies and as they are no longer supported in newer versions of kmp we were forced to remove them. We have since gone back on those dep upgrades, so I wonder if we should bring these targets back. https://kotlinlang.org/docs/multiplatform/whats-new-compose-111.html#changes-to-ios-target-support
s
Hmm. But our plain KMP (non-Compose) project still builds for
macos_x64
, we just needed to suppress the deprecation. Can't Kotest do the same? Where's Compose used in Kotest?
s
I guess we were too eager in removing them. We can add them back, but deprecated and do a 6.2.1 ?
👍 1
what was the targets - just macos_x64 ?
a
I guess if we are adding them back in, we should re include all. iOS, macOs and whatever else was removed here https://github.com/kotest/kotest/pull/5820
s
yeah fair enough
don't even need our buddy claude for this one
a
Save the tokens for a rainy day
😂 1
Try 6.2.1
🙌 1
🚀 1
s
The release is missing at https://github.com/kotest/kotest/releases, though. Isn't there some automation to create it?
s
not currently, we have to click the button. Will do it now.
❤️ 1