swift-algorithms: Xcode 14 & iOS 16 compile errors

The libray doesn’t compile under Xcode 14 and iOS 16 beta 4

Swift Algorithms version: 1.0.0

Checklist

  • [x ] If possible, I’ve reproduced the issue using the main branch of this package
  • I’ve searched for existing GitHub issues

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 15 (1 by maintainers)

Most upvoted comments

Screen Shot 2022-08-21 at 10 42 51

I think same issue here, a ton of “let” property… use self.init in the pod files, something like 50 errors in the various files /and already did a complete reinstall of Xcode/

If you use Cocoapods, try adding the following into post_install do |installer| in Podfile so it looks like:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
        if target.name == "SwiftAlgorithms"
           config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'NO'
       end
    end
  end
end

and then run pod install. That might help

Screen Shot 2022-08-21 at 10 42 51 I think same issue here, a ton of "let" property... use self.init in the pod files, something like 50 errors in the various files

/and already did a complete reinstall of Xcode/

Bump; how can BUILD_LIBRARY_FOR_DISTRIBUTION be enabled?

Please fix.

It seems that decorating the culprit Sequences and Collections (e.g. AdjacentPairsSequence, AdjacentPairsCollection, etc) with the @frozen modifier fixes this. Alas, ABI Stability isn’t quite my forte.

@natecook1000 @xwu and anyone else who may know, does application of the @frozen decorator sound like the Correct™ approach here? If so, I’d be happy to follow up with a PR. Otherwise, I’ll turn my attention to Charts.