Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle task kspKotlinIosSimulatorArm64 fails in 1.0.0-ALPHA-38 #198

Open
Saad-Mufti opened this issue Dec 17, 2024 · 8 comments
Open

Gradle task kspKotlinIosSimulatorArm64 fails in 1.0.0-ALPHA-38 #198

Saad-Mufti opened this issue Dec 17, 2024 · 8 comments

Comments

@Saad-Mufti
Copy link

> Task :shared:kspKotlinIosSimulatorArm64 FAILED
Custom actions are attached to task ':shared:kspKotlinIosSimulatorArm64'.
Caching disabled for task ':shared:kspKotlinIosSimulatorArm64' because:
  Build cache is disabled
Task ':shared:kspKotlinIosSimulatorArm64' is not up-to-date because:
  Input property 'excludeOriginalPlatformLibraries$kotlin_gradle_plugin_common' file /Users/saad/.konan/kotlin-native-prebuilt-macos-aarch64-2.1.0/klib/platform/ios_simulator_arm64/org.jetbrains.kotlin.native.platform.CoreFoundation/default has been removed.
  Input property 'excludeOriginalPlatformLibraries$kotlin_gradle_plugin_common' file /Users/saad/.konan/kotlin-native-prebuilt-macos-aarch64-2.1.0/klib/platform/ios_simulator_arm64/org.jetbrains.kotlin.native.platform.CoreFoundation/default/linkdata has been removed.
  Input property 'excludeOriginalPlatformLibraries$kotlin_gradle_plugin_common' file /Users/saad/.konan/kotlin-native-prebuilt-macos-aarch64-2.1.0/klib/platform/ios_simulator_arm64/org.jetbrains.kotlin.native.platform.CoreFoundation/default/linkdata/module has been removed.
file or directory '/Users/saad/app/shared/src/appleMain/kotlin', not found
file or directory '/Users/saad/app/shared/src/nativeMain/kotlin', not found
file or directory '/Users/saad/app/shared/src/iosSimulatorArm64Main/kotlin', not found
file or directory '/Users/saad/app/shared/src/appleMain/kotlin', not found
file or directory '/Users/saad/app/shared/src/nativeMain/kotlin', not found
Can't find env_blacklist file at /Users/saad/.konan/kotlin-native-prebuilt-macos-x86_64-2.1.0/tools/env_blacklist.
error: org.jetbrains.kotlin.cli.utilities.MainKt

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':shared:kspKotlinIosSimulatorArm64'.
> java.lang.ClassNotFoundException: org.jetbrains.kotlin.cli.utilities.MainKt

I'm new to KMP-NativeCoroutines and am not sure if I'm doing something wrong here - above is the error excerpt from running ./gradlew :shared:embedAndSignAppleFrameworkForXcode --info as a build phase in my iOS app. Any help would be appreciated.

KMP-NativeCoroutines version: 1.0.0-ALPHA-38
KSP version: 2.1.0-1.0.29
MacOS version 15.2 (Sequoia), Apple M2 chip
XCode Version 16.2 (16C5032a)

@rickclephas
Copy link
Owner

Sounds like there is an issue with the ~/.konan directory similar to this issue.

Could you try to sync in IntelliJ/Android Studio and/or clearing the konan directory?

@Saad-Mufti
Copy link
Author

Saad-Mufti commented Dec 18, 2024

I tried that, to no effect.

@chromecountry
Copy link

I am having a similar issue where cocoapods doesn't recognize [1.0.0-ALPHA-38], only up to ALPHA-5 version, but when i reduce the plugin in Kotlin to ALPHA 5 i see a similar error for kotlin 2.1.0.

Does alpha-5 work for kotlin 2.1.0?

@rickclephas
Copy link
Owner

@chromecountry no Kotlin 2.1.0 is only supported in 1.0.0-ALPHA-38

@chromecountry
Copy link

chromecountry commented Jan 20, 2025

@rickclephas when I add the following to my pod file:

  # Pods for iosApp
  pod 'KMPNativeCoroutinesAsync', '1.0.0-ALPHA-38'    # Swift Concurrency implementation
  pod 'KMPNativeCoroutinesCombine', '1.0.0-ALPHA-38'  # Combine implementation
  pod 'KMPNativeCoroutinesRxSwift', '1.0.0-ALPHA-38'  # RxSwift implementation

I get this error:

alex@anothergreenworld iosApp $ pod repo update
Updating spec repo `trunk`
{10:29:59}[/Users/alex/lab/training/kotlin/dogify/iosApp] =====================================(* master)
alex@anothergreenworld iosApp $ pod install
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "KMPNativeCoroutinesRxSwift":
  In Podfile:
    KMPNativeCoroutinesRxSwift (= 1.0.0-ALPHA-38)

None of your spec sources contain a spec satisfying the dependency: `KMPNativeCoroutinesRxSwift (= 1.0.0-ALPHA-38)`.

You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * mistyped the name or version.
 * not added the source repo that hosts the Podspec to your Podfile.

[!] Automatically assigning platform `iOS` with version `16.0` on target `iosApp` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

When I check cocoapods.org I do not see ALPHA-38 available

@rickclephas
Copy link
Owner

@chromecountry there is an issue with the RxSwift CocoaPods publication that I am looking into.
If you don't need the RxSwift support you can just remove it. Otherwise you could try to use the Swift Package Manger for now.

@chromecountry
Copy link

@rickclephas Thank you. It'd be simpler to not have to migrate away from cocoapods / kotlin 2.1 for my project. Do you have an ETA on when we can expect the CocoaPods publication to be fixed? I am ok to wait if this will only take a few days.

@rickclephas
Copy link
Owner

@chromecountry no ETA, but hopefully soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants