orlandos-nl / BSON

Native Swift library for BSON (http://bsonspec.org)
https://orlandos.nl/docs/mongokitten/articles/bson
MIT License
109 stars 35 forks source link

BSON doesn't compile in Swift 5.5 (Xcode 13 beta 4) due to fix for SR-14848 #69

Closed fritzt0 closed 3 years ago

fritzt0 commented 3 years ago

BSON doesn't compile anymore in Swift 5.5 from Xcode 13 beta 4 due to a fix for SR-14848. From the release notes of Xcode 13 beta 4:

The Swift standard library no longer provides a nonfunctional default implementation of the subscript(bounds: Range) accessor for Collection implementors whose SubSequence isn’t Slice. Define your code’s subscript(bounds: Range) -> SubSequence, or use Slice as your Collection’s SubSequence. (SR-14848, 79891982)

Errors are:

type 'Document' does not conform to protocol 'RandomAccessCollection' type 'DocumentSlice' does not conform to protocol 'RandomAccessCollection'

Joannis commented 3 years ago

Morning! I heard of the issue before, but I didn't realise it was a change to the standard library. Thanks for informing me!

evnik commented 3 years ago

@Joannis Thank you for the fix, could you please push 7.0.28 to CocoaPods, so we can use the latest version in our project?

Joannis commented 3 years ago

Done @evnik