CoreStore doesn't compile with Swift 3.1 #126

Closed
opened 2025-12-29 15:24:58 +01:00 by adam · 5 comments
Owner

Originally created by @ThibaultVlacich on GitHub (Jan 29, 2017).

Swift 3.1 is shipped with Xcode 8.3 beta (supposed to be source compatible with Swift 3), but CoreStore doesn't compile in Xcode 8.3.

Here are the errors I get:

CoreStore Group
Swift Compiler Error Group
/Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CSAsynchronousDataTransaction.swift:167:1: Type 'AsynchronousDataTransaction' does not conform to protocol 'CoreStoreSwiftType'
/Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CoreStoreBridge.swift:68:9: Protocol requires property 'bridgeToObjectiveC' with type 'AsynchronousDataTransaction.ObjectiveCType' (aka 'CSAsynchronousDataTransaction'); do you want to add a stub?
/Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CoreStoreBridge.swift:73:16: Candidate has non-matching type 'Self.ObjectiveCType'
/Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CSAsynchronousDataTransaction.swift:68:37: 'SynchronousDataTransaction' is not convertible to 'BaseDataTransaction'
/Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CSCoreStore+Transaction.swift:43:33: 'AsynchronousDataTransaction' is not convertible to 'BaseDataTransaction'
/Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CSCoreStore+Transaction.swift:61:37: 'SynchronousDataTransaction' is not convertible to 'BaseDataTransaction'
/Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CSCoreStore+Transaction.swift:75:23: Cannot convert value of type '() -> UnsafeDataTransaction' to expected argument type '() -> _'
/Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CSCoreStore+Transaction.swift:90:23: Cannot convert value of type '() -> UnsafeDataTransaction' to expected argument type '() -> _'
/Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CSDataStack+Transaction.swift:43:33: 'AsynchronousDataTransaction' is not convertible to 'BaseDataTransaction'
/Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CSDataStack+Transaction.swift:61:37: 'SynchronousDataTransaction' is not convertible to 'BaseDataTransaction'
/Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CSDataStack+Transaction.swift:75:23: Cannot convert value of type '() -> UnsafeDataTransaction' to expected argument type '() -> _'
/Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CSDataStack+Transaction.swift:90:23: Cannot convert value of type '() -> UnsafeDataTransaction' to expected argument type '() -> _'
/Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CSSynchronousDataTransaction.swift:166:1: Type 'SynchronousDataTransaction' does not conform to protocol 'CoreStoreSwiftType'
/Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CoreStoreBridge.swift:68:9: Protocol requires property 'bridgeToObjectiveC' with type 'SynchronousDataTransaction.ObjectiveCType' (aka 'CSSynchronousDataTransaction'); do you want to add a stub?
/Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CoreStoreBridge.swift:73:16: Candidate has non-matching type 'Self.ObjectiveCType'
/Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CSSynchronousDataTransaction.swift:68:37: 'SynchronousDataTransaction' is not convertible to 'BaseDataTransaction'
Originally created by @ThibaultVlacich on GitHub (Jan 29, 2017). Swift 3.1 is shipped with Xcode 8.3 beta (supposed to be source compatible with Swift 3), but CoreStore doesn't compile in Xcode 8.3. Here are the errors I get: ``` CoreStore Group Swift Compiler Error Group /Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CSAsynchronousDataTransaction.swift:167:1: Type 'AsynchronousDataTransaction' does not conform to protocol 'CoreStoreSwiftType' /Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CoreStoreBridge.swift:68:9: Protocol requires property 'bridgeToObjectiveC' with type 'AsynchronousDataTransaction.ObjectiveCType' (aka 'CSAsynchronousDataTransaction'); do you want to add a stub? /Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CoreStoreBridge.swift:73:16: Candidate has non-matching type 'Self.ObjectiveCType' /Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CSAsynchronousDataTransaction.swift:68:37: 'SynchronousDataTransaction' is not convertible to 'BaseDataTransaction' /Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CSCoreStore+Transaction.swift:43:33: 'AsynchronousDataTransaction' is not convertible to 'BaseDataTransaction' /Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CSCoreStore+Transaction.swift:61:37: 'SynchronousDataTransaction' is not convertible to 'BaseDataTransaction' /Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CSCoreStore+Transaction.swift:75:23: Cannot convert value of type '() -> UnsafeDataTransaction' to expected argument type '() -> _' /Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CSCoreStore+Transaction.swift:90:23: Cannot convert value of type '() -> UnsafeDataTransaction' to expected argument type '() -> _' /Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CSDataStack+Transaction.swift:43:33: 'AsynchronousDataTransaction' is not convertible to 'BaseDataTransaction' /Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CSDataStack+Transaction.swift:61:37: 'SynchronousDataTransaction' is not convertible to 'BaseDataTransaction' /Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CSDataStack+Transaction.swift:75:23: Cannot convert value of type '() -> UnsafeDataTransaction' to expected argument type '() -> _' /Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CSDataStack+Transaction.swift:90:23: Cannot convert value of type '() -> UnsafeDataTransaction' to expected argument type '() -> _' /Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CSSynchronousDataTransaction.swift:166:1: Type 'SynchronousDataTransaction' does not conform to protocol 'CoreStoreSwiftType' /Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CoreStoreBridge.swift:68:9: Protocol requires property 'bridgeToObjectiveC' with type 'SynchronousDataTransaction.ObjectiveCType' (aka 'CSSynchronousDataTransaction'); do you want to add a stub? /Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CoreStoreBridge.swift:73:16: Candidate has non-matching type 'Self.ObjectiveCType' /Users/thibault/dev/iOS-Application/Pods/CoreStore/Sources/ObjectiveC/CSSynchronousDataTransaction.swift:68:37: 'SynchronousDataTransaction' is not convertible to 'BaseDataTransaction' ```
adam added the fixed label 2025-12-29 15:24:58 +01:00
adam closed this issue 2025-12-29 15:24:58 +01:00
Author
Owner

@JohnEstropia commented on GitHub (Jan 30, 2017):

Thanks for the report! I haven't tried it with 8.3 yet, will look into this.

@JohnEstropia commented on GitHub (Jan 30, 2017): Thanks for the report! I haven't tried it with 8.3 yet, will look into this.
Author
Owner

@MosheBerman commented on GitHub (Feb 6, 2017):

Related: https://bugs.swift.org/browse/SR-3796

@MosheBerman commented on GitHub (Feb 6, 2017): Related: https://bugs.swift.org/browse/SR-3796
Author
Owner

@JohnEstropia commented on GitHub (Feb 7, 2017):

Sorry if I haven't touched this for a while.

@MosheBerman Thanks for that link! To the person who brought this to the Swift team, thanks as well!

The bridge() method in question is just an internal utility within CoreStore and should be omittable. I'll try to make a workaround by the end of the day.

@JohnEstropia commented on GitHub (Feb 7, 2017): Sorry if I haven't touched this for a while. @MosheBerman Thanks for that link! To the person who brought this to the Swift team, thanks as well! The `bridge()` method in question is just an internal utility within CoreStore and should be omittable. I'll try to make a workaround by the end of the day.
Author
Owner

@JohnEstropia commented on GitHub (Feb 7, 2017):

This is fixed in the latest 3.0.2 update (develop branch). Please tell if you find other problems, thanks!

Will push to the master branch and Cocoapods when Xcode 8.3 GM build is released.

@JohnEstropia commented on GitHub (Feb 7, 2017): This is fixed in the latest 3.0.2 update (develop branch). Please tell if you find other problems, thanks! Will push to the master branch and Cocoapods when Xcode 8.3 GM build is released.
Author
Owner

@JohnEstropia commented on GitHub (Feb 7, 2017):

For reference: bdf6308d8f

@JohnEstropia commented on GitHub (Feb 7, 2017): For reference: https://github.com/JohnEstropia/CoreStore/commit/bdf6308d8fa236c1d0b97f590fa6c9e0c42badeb
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/CoreStore#126