I'm trying to get dependency target based in SPM, I have Package.swift defined here:
So I have RxSwift defined in package dependencies but it's NOT used in target ReCaptcha but only in target ReCaptchaRx
What I expected to happen:
If I choose to select only one target without Rx I expected it to fetch only ReCaptcha dependency and ignore Rx.
What actually happen:
After importing only ReCaptcha I'm getting package resolved but unusable, if I choose on import window ReCaptchaRx I'm getting as expected usable Rx what is fine. But why then SPM even fetching and resolving RxSwift in this case?
Question
Why Xcode is resolving RxSwift on target that does not have a dependency to it? Can that be prevented? I would expect similar behaviour as with AppSwizzle in this example that if target is not used is not being resolved.
Source code:
This is an open source library available here: https://github.com/JakubMazur/ReCaptcha/blob/swift-package-manager/Package.swift
If you want to checkout this in SPM will resolve package from https://github.com/JakubMazur/ReCaptcha on branch swift-package-manager


