-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
-
Please specify the PromiseKit major version you are using
6 -
Please specify how you installed PromiseKit, ie. Carthage, CocoaPods, SwiftPM or other. If other provide DETAILED information about how you are integrating PromiseKit.
CocoaPods and indirectly with SPM (see text)
AnyPromise
is not available when using Swift PackageManager. But why?
I read in another issue that this is documented but I can't find anything regarding this fact.
My Problem:
I'm using PromiseKit in a mixed Swift/ObjC project. I'm including PromiseKit using CocoaPods but trying to successively switch to SPM. Since I need AnyPromise
, I wasn't able to move PromiseKit from CocoaPods to SPM so far.
But now I ran into another Problem: I'm using a SwiftPackage, which itself has a dependency to PromiseKit. Now my main project is complaining that AnyPromise
isn't available, because the SPM (internal) dependency to PromiseKit is "overriding" the CocoaPods dependency. As far as I know, there is no way, to create something like a "private" dependency within a Swift Package. All dependencies are automatically "re-exported" and visible to the main project.
I was searching through the Swift Forums already but there currently seems to be no way to avoid re-exporting SPM package dependencies. Maybe if I understand why AnyPromise
isn't available when using SPM I might be able to find a workaround.