modo-studio / SugarRecord

CoreData/Realm sweet wrapper written in Swift
MIT License
2.11k stars 223 forks source link

realm-cocoa 1.1.0 fails on xcode8.3 with redefinition of module 'Realm' #324

Closed kirmanie closed 7 years ago

kirmanie commented 7 years ago

What

SugarRecord depends on realm-cocoa v1.1.0. realm-cocoa v1.1.0 doesn't build with carthage on xcode8.3. realm-cocoa 1.1.0 fails during carthage bootstrap.

Context

The following is the error building realm-cocoa v1.1.0 using carthage 0.18.1 on xcode8.3:

⇒  carthage update --no-use-binaries --platform iOS
*** Checking out realm-cocoa at "v1.1.0"
....
The following build commands failed:
    CompileC /Users/KIRMANIE_RAVARIERE/Library/Developer/Xcode/DerivedData/Realm-hgctfiwqtxsbtlfnlfoaylewdyxe/Build/Intermediates/Realm.build/Release-iphoneos/Realm.build/Objects-normal/armv7/RLMSwiftSupport.o Realm/RLMSwiftSupport.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
/Users/KIRMANIE_RAVARIERE/Desktop/cart/Carthage/Checkouts/realm-cocoa/Realm/module.modulemap:1:18: error: redefinition of module 'Realm'
A shell task (/usr/bin/xcrun xcodebuild -workspace /Users/KIRMANIE_RAVARIERE/Desktop/cart/Carthage/Checkouts/realm-cocoa/Carthage/Realm.xcworkspace -scheme Realm -configuration Release -sdk iphoneos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES clean build) failed with exit code 65:
2017-04-03 15:28:16.140 xcodebuild[39778:235993] [MT] PluginLoading: Required plug-in compatibility UUID DFFB3951-EB0A-4C09-9DAC-5F2D28CC839C for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XVim.xcplugin' not present in DVTPlugInCompatibilityUUIDs
** BUILD FAILED **

Proposal

I built realm-cocoa 2.5.0 using carthage 0.18.1 on xcode8.3 and it succeeded. I suggest an upgrade of realm-cocoa to fix the issue.

pepicrft commented 7 years ago

Hello @kirmanie, we've just released a new version of SugarRecord removing Realm support https://github.com/carambalabs/SugarRecord/releases/tag/3.1.1.

We believe that the API of Realm is very mature and simple enough to need another wrapper on top of it. However, this layer keeps making sense with Core Data, where the setup and the operations introduce some overhead.

I'll close this issue since it's out of the scope of the library.

kirmanie commented 7 years ago

@pepibumur thanks! But the Cartfile/Cartfile.resolved still has realm as a dependency. Are those going to be removed as well? As is, Carthage users would still not be able to build SugarRecord 3.1.1 in xcode8.3