hmlongco / Factory

A new approach to Container-Based Dependency Injection for Swift and SwiftUI.
MIT License
1.93k stars 116 forks source link

Xcode 15.2 compatibility #239

Closed masterchiip closed 1 month ago

masterchiip commented 1 month ago

Hi team, I'm exploring your library and noticed that with Xcode 15.2 I can't build the demo project using v2.4.0. I'm getting many compiler errors like this one. image

With v2.3.2 I was able to compile.

bweissmann commented 1 month ago

+1 We got the same errors on our build pipeline (MS AppCenter, Xcode 15.0.1 Preview). Locking our version of Factory to <2.4.0 until resolved 🙂

hmlongco commented 1 month ago

Not sure these will be resolved. 2.4 is Xcode 16 support.

bweissmann commented 1 month ago

Thank you for the clarification, I can report that upgrading our build pipeline to Xcode 16 with Factory 2.4.0 has resolved our issue.

masterchiip commented 1 month ago

Any ideas how this could be fixed @hmlongco ? I could help with exploring the fix.

hmlongco commented 1 month ago

Not without going and conditionalizing a bunch of code and I'm not sure what the point of that would be. If you need Xcode 15 support cap the version at 2.3.x. In about five or six months you're going to have to move to Xcode 16 anyway.

masterchiip commented 1 month ago

Agree, thank you very much!

philippelesaux commented 1 month ago

The minimum Swift version should probably be bumped, then, since the Swift 5.9 compiler is not compatible with the source in >= 2.4

https://github.com/hmlongco/Factory/blob/main/Package.swift#L1