xmartlabs / Eureka

Elegant iOS form builder in Swift
https://eurekacommunity.github.io
MIT License
11.76k stars 1.33k forks source link

Fails to compile in Xcode 9 #1082

Closed geoffmacd closed 7 years ago

geoffmacd commented 7 years ago

With Swift version 3.2 as compiled with Xcode 9 - Beta 1. Installed as a pod with use_framworks!

/Users/geoffmacdonald/imgur-ios/Pods/Eureka/Source/Core/Section.swift:206:1: error: 'Collection' requires the types 'Section.SubSequence' (aka 'Array<BaseRow>') and 'ArraySlice<BaseRow>' be equivalent
extension Section : MutableCollection, BidirectionalCollection {
^
/Users/geoffmacdonald/imgur-ios/Pods/Eureka/Source/Core/Section.swift:206:1: note: requirement specified as 'Self.SubSequence' == 'Self.SubSequence.SubSequence' [with Self = Section]
extension Section : MutableCollection, BidirectionalCollection {
^
/Users/geoffmacdonald/imgur-ios/Pods/Eureka/Source/Core/SelectableSection.swift:65:43: error: associated type 'Self.SubSequence.SubSequence' cannot be equal to both 'Section.SubSequence' (aka 'Array<BaseRow>') and 'ArraySlice<BaseRow>'
extension SelectableSectionType where Self: Section, Self.Iterator == IndexingIterator<Section>, Self.Iterator.Element == BaseRow {
                                          ^
/Users/geoffmacdonald/imgur-ios/Pods/Eureka/Source/Core/Section.swift:206:1: error: 'Collection' requires the types 'Section.SubSequence' (aka 'Array<BaseRow>') and 'ArraySlice<BaseRow>' be equivalent
extension Section : MutableCollection, BidirectionalCollection {
^
/Users/geoffmacdonald/imgur-ios/Pods/Eureka/Source/Core/Section.swift:206:1: note: requirement specified as 'Self.SubSequence' == 'Self.SubSequence.SubSequence' [with Self = Section]
extension Section : MutableCollection, BidirectionalCollection {
ivanbruel commented 7 years ago

This seemed to be an issue of Protocol conformance with Collection where the subscript should return an ArraySlice instead of an actual Array type. I've fixed it, let me know if that works out for all of you working under Xcode 9.

mats-claassen commented 7 years ago

Hi, swift3.2 branch works with Xcode 9 beta. Thanks @ivanbruel for the contribution!

geoffmacd commented 7 years ago

thanks guys

mahirekici commented 7 years ago

I have this problem ?

Xcode 9

requires the types 'Section.SubSequence' (aka 'Array') and 'ArraySlice' be equivalent

valentinjahanmanesh commented 7 years ago

me too xcode 9 beta 3

yoman07 commented 7 years ago

xcode 9 beta 4 doesn't work

pedrodelavega commented 7 years ago

FYI, xcode 9 beta 5 is working with swift3.2 branch

alexvazquez commented 6 years ago

How can I update Pod Eureka to Beta 5?

chappejw commented 6 years ago

Having the same issue on the newly released Xcode 9...

'Collection' requires the types 'Section.SubSequence' (aka 'Array<BaseRow>') and 'ArraySlice<BaseRow>' be equivalent

halldorg commented 6 years ago

Same here on the released xcode 9

'Collection' requires the types 'Section.SubSequence' (aka 'Array') and 'ArraySlice' be equivalent

hesyifei commented 6 years ago

pod 'Eureka', :git => 'https://github.com/xmartlabs/Eureka.git', :branch => 'Xcode9-Swift4' does not work for me. But pod 'Eureka', :git => 'https://github.com/xmartlabs/Eureka.git', :branch => 'Xcode9-Swift3_2' does.

elalienx commented 6 years ago

The problems appears again in Xcode 9.4 and Swift 4.2

mats-claassen commented 6 years ago

Swift 4.2 is available in Xcode 10.

There is also a Swift-4.2 branch

FrancoisClement commented 5 years ago

Same problem in xCode 9.4, Swift 4.1 @elalienx did you find a fix ?

thawzinoomyanmar commented 5 years ago

How to fix problem swift compiler issues in got Eureka .

mats-claassen commented 5 years ago

For Xcode 10 use Eureka 4.3. For older versions use 4.2.