Open dmun opened 6 months ago
Hi, thanks for your report.
In my sample-app project next to the library i can run gradle check just fine - without any tests, admittedly. Are you trying to run tests inside src/commonMain or iosMain? Do you have a minimal example project?
I'm using swiftklib to be able to use CryptoKit for the iOS implementation and i set a minimal iOS version of 15, which seems related to the error message.
I'm also using kotlin 1.9.20 in the lib, so that might be related as well.
Hi thank you for your response. I made a small project with the reproducible error.
I have the tests in a separate /shared/src/commonTest
module which also seems to launch the linkDebugTestIosSimulatorArm64 for some reason. Not sure if that's intended but I dont think that has something to do with this library.
Running the sample project with the libs.versions.toml
properties below works with no errors:
compose-compiler = "1.5.4"
kotlin = "1.9.20"
but with these you get the same error as the original issue:
compose-compiler = "1.5.9"
kotlin = "1.9.22"
So I guess its just a version issue
Ok thanks for trying with the older kotlin version! I have a commit in place to update to kotlin 1.9.22, just merged to develop.
Seems that versions have to match. I will test myself and maybe include compatibility notes in the readme. If you want, you can try with the snapshot build that should soon be published to sonatype-snaphots (https://s01.oss.sonatype.org/content/repositories/snapshots/)
Check the ci run here for finish: https://github.com/kalinjul/kotlin-multiplatform-oidc/actions/runs/7977261134
Thank you, but I tried using the 0.8.2-SNAPSHOT on the sample project but it still happens. I think I might have to downgrade my personal own dependencies if these version compatibility docs are still up to date.
I don't think they are - using 1.9.22 should be ok.
I still don't know why this is happening, but it seems to pull in the Library Search Path that was used on the github ci at the time of building the library (ld: warning: search path '/Applications/Xcode_15.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator' not found).
Here's a workaround, you can pass your local search path:
listOf(
// iosX64(),
iosArm64(),
iosSimulatorArm64()
).forEach {
it.binaries.framework {
baseName = "shared"
isStatic = true
}
it.compilations.all {
kotlinOptions {
freeCompilerArgs = listOf("-linker-options", "-L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator")
}
}
}
With this, you sample builds with 1.9.22 (even using the non-snapshot library). I still have no idea, why this happens with kotlin 1.9.22.
Thank you for the effort! That seems to work for me. The error is fixed and only got some warnings. I'm not sure if they are urgent but I will leave them here:
warning: /Users/runner/work/kotlin-multiplatform-oidc/kotlin-multiplatform-oidc/oidc-crypto/build/swiftklib/KCrypto/iosSimulatorArm64/swiftBuild/.build/arm64-apple-macosx/release/ModuleCache/XN47GV1ZJBG0/Foundation-32EX3ABEWCIX8.pcm: No such file or directory
note: while processing /Users/runner/work/kotlin-multiplatform-oidc/kotlin-multiplatform-oidc/oidc-crypto/build/swiftklib/KCrypto/iosSimulatorArm64/swiftBuild/.build/arm64-apple-macosx/release/ModuleCache/XN47GV1ZJBG0/Foundation-32EX3ABEWCIX8.pcm
note: Linking a static library that was built with -gmodules, but the module cache was not found. Redistributable static libraries should never be built with module debugging enabled. The debug experience will be degraded due to incomplete debug information.
warning: /Users/runner/work/kotlin-multiplatform-oidc/kotlin-multiplatform-oidc/oidc-crypto/build/swiftklib/KCrypto/iosSimulatorArm64/swiftBuild/.build/arm64-apple-macosx/release/ModuleCache/XN47GV1ZJBG0/SwiftShims-1NZUW0EWXE1R1.pcm: No such file or directory
note: while processing /Users/runner/work/kotlin-multiplatform-oidc/kotlin-multiplatform-oidc/oidc-crypto/build/swiftklib/KCrypto/iosSimulatorArm64/swiftBuild/.build/arm64-apple-macosx/release/ModuleCache/XN47GV1ZJBG0/SwiftShims-1NZUW0EWXE1R1.pcm
warning: /Users/runner/work/kotlin-multiplatform-oidc/kotlin-multiplatform-oidc/oidc-crypto/build/swiftklib/KCrypto/iosSimulatorArm64/swiftBuild/.build/arm64-apple-macosx/release/ModuleCache/XN47GV1ZJBG0/_SwiftConcurrencyShims-1NZUW0EWXE1R1.pcm: No such file or directory
note: while processing /Users/runner/work/kotlin-multiplatform-oidc/kotlin-multiplatform-oidc/oidc-crypto/build/swiftklib/KCrypto/iosSimulatorArm64/swiftBuild/.build/arm64-apple-macosx/release/ModuleCache/XN47GV1ZJBG0/_SwiftConcurrencyShims-1NZUW0EWXE1R1.pcm
These are from the sample project I provided earlier so you can check them out if you want
Hi there! First of all thank you for the library, setting up authentication was very straightforward using this library.
I've been ignoring these warnings/errors when running my iOS app for while. But now that I need to run my tests using
gradle check
, the task fails with the following errors.For context, I'm using your experimental TokenStore and Ktor support. I tried changing versions to match the Kotlin compatibility versions, I tried changing linkerOpts, but without success. I'm pretty new to Kotlin Multiplatform so I might be overlooking something.
I found this issue: Link CocoaPods frameworks with iosTest binary, but not sure if it's still relevant.