facebook / componentkit

A React-inspired view framework for iOS.
http://www.componentkit.org/
Other
5.76k stars 587 forks source link

ComponentKit does not compile with Xcode 12.5 #962

Closed ColinCammaranoAccolade closed 3 years ago

ColinCammaranoAccolade commented 3 years ago

Hello! I recently updated Xcode to 12.5 via the App Store and ran into a few interesting compiler errors in ComponentKit when compiling my iOS (Swift + Objective-C) app. The errors occur regardless of the build target; I attempted to build for a physical device, the generic build target, and a few simulators. The errors are as follows:

/Users/colin.cammarano/Workspace/Mobile/Test App/Pods/ComponentKit/ComponentKit/Core/ComponentTree/CKTreeNode.mm:54:73: Cannot initialize a parameter of type 'id<CKComponentProtocol> _Nonnull' with an lvalue of type '__unsafe_unretained Class'

/Users/colin.cammarano/Workspace/Mobile/Test App/Pods/ComponentKit/ComponentKit/Core/ComponentTree/CKTreeNode.mm:86:75: Cannot initialize a parameter of type 'id<CKComponentProtocol> _Nonnull' with an rvalue of type 'Class'

Screen Shot 2021-04-27 at 2 28 46 PM

I hadn't made any code changes since my app's last successful build, so I reinstalled Xcode 12.4, built the app again, and noticed that the errors did not appear. To verify that I could reproduce this issue, I performed the following steps:

  1. Created a new iOS app project in Xcode
  2. Initialized the new project with Cocoapods
  3. Installed ComponentKit via CocoaPods
  4. Opened the .xcworkspace file generated by Cocoapods with Xcode 12.5
  5. Built the app

By following these steps, I was able to successfully reproduce this issue with pure Swift, pure Objective-C, and mixed language (Swift + Objective-C) apps. Has anyone else experienced this issue?

If you need any more information from me, please let me know and I'll do my best to provide it. Thanks!

cuva commented 3 years ago

@ColinCammaranoAccolade version 0.31 should resolve these issues. Closing.