kdoctor icon indicating copy to clipboard operation
kdoctor copied to clipboard

Cocoapods failure not appropriate when Cocoapods support is not desired

Open theextremeprogrammer opened this issue 2 years ago • 1 comments

Hello friends!

First of all - thank you for building this tool for KMM development! I was excited when I saw it mentioned in the Kotlin blog a little while back as I've been using KMM for the last couple of years.

I just ran the tool and here is the output that was generated for reference:

[v] System
    OS: macOS (12.4)
    CPU: Apple M1 Max
[v] Java
    Java (openjdk version "11.0.12" 2021-07-20)
    Location: /Library/Java/JavaVirtualMachines/Android Studio JRE/Contents/Home/bin/java

    JAVA_HOME=/Library/Java/JavaVirtualMachines/Android Studio JRE/Contents/Home

    * Note that, by default, Android Studio uses bundled JDK for Gradle tasks execution.
          Gradle JDK can be configured in Android Studio Preferences under Build, Execution, Deployment -> Build Tools -> Gradle section

[v] Android Studio
    Android Studio (2021.2)
    Location: /Applications/Android Studio.app
    Bundled Java: openjdk 11.0.12 2021-07-20
    Kotlin Plugin: 212-1.7.0-release-281-AS5457.46
    Kotlin Multiplatform Mobile Plugin: 0.3.3(212-1.7.0-RC-release-217-IJ)-104

[v] Xcode
    Xcode (13.4.1)
    Location: /Applications/Xcode.app

[x] Cocoapods
    * ruby version ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [arm64-darwin21] is not compatible with cocoapods-generate
      More details: https://github.com/rubygems/rubygems/issues/4338
          Downgrade ruby to version < 3.0.0

    ruby (ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [arm64-darwin21])

    ruby gems (3.2.3)

    cocoapods (1.11.2)

    * cocoapods-generate plugin not found
          Get cocoapods-generate from https://github.com/square/cocoapods-generate#installation

Failures: 1
KDoctor has diagnosed one or more problems while checking your environment.
Please check the output for problem description and possible solutions.

While I happen to have Cocoapods installed (via Homebrew) for some other Xcode projects, based on personal preference for my own projects, I do not use Cocoapods. Therefore, receiving information regarding how cocoapods is not configured properly for me is irrelevant.

I'm not sure if there are other developers who are similar to me, however, if there are, then I would suggest it might be helpful to make the Cocoapods confirmation optional as it is not required for KMM (or iOS) development, or change the verification result from "error" to warning with a stipulation that it is only important if you are actively using Cocoapods.

theextremeprogrammer avatar Jul 11 '22 16:07 theextremeprogrammer

Agreed! We recently migrated over from Cocoapods to Swift Package Manager + a shared framework in our KMM project, so the failing Cocoapods check is misleading & irrelevant to us.

sebj avatar Aug 23 '22 11:08 sebj