I hope I'm not touching a "controversial" topic :)
I'm a big fan of Moya, and I use it a lot. I'm also a big fan of RxSwift and I try to keep up do date with it as much as I can.
Keeping it up with RxSwift releases and keeping RxMoya at the same time has become impossible: every time there's a new Rx release we have to wait for a new Moya release, only to have three "simple" source files that hasn't changed at all in the last 2 years.
The easiest way I've found to have a working environment that makes me happy with both of them is to use Cocoapods, use the main "Core" spec of Moya and drag'n'drop the Rx files manually in my project. With this "hack", I can use RxSwift 6.1 with Moya 14 and keep on using the rx extensions.
The problem is that Cocoapods is "flexible" enough to know that the main subspec should NOT depend on Rx (or Reactive), so it won't add it to the dependencies tree... but Carthage doesn't (as clearly stated in Moya's readme).
If I want to use Moya I'm forced to clone and build RxSwift and ReactiveSwift at their specific version locked by Moya even if I'm not using RxSwift/ReactiveSwift at all in my project (tolerable, I just delete the frameworks if needed) or if I want to use those frameworks without RxMoya and ReactiveMoya.
If I try today a simple example by including latest versions of RxGesture and Moya with Carthage, carthage boostrap won't work, as RxGesture previous versions are not compatible anymore with RxSwift 5.x (not compiling), and the latest one is only ~> 6.0.
Why should I be locked by Moya if I don't want to use reactive extensions? RxSwift is a huge, "horizontal" dependency for every project, I feel
To get to my point: do we really need the reactive extensions to be included in this main repository? Can we somehow move them to specific subrepositories? Or simply remove them and have 3 source file (maybe a single one) to manually import when needed and document it?
I didn't get the chance to try with SPM but i suspect a similar problem.
Thank you :)
+1
I think that it can be split into three repositories: Moya, RxMoya, ReactiveMoya.
There's a similar situation with SPM. When trying to set Moya's version to 14.0.0 and RxSwift to 6.0.0 (both next major) there's a following error message:
Failed to resolve dependencies
because Moya >=14.0.0-alpha.1 depends on RxSwift 5.0.0..<6.0.0 and root depends on Moya 14.0.0..<15.0.0, RxSwift 5.0.0..<6.0.0 is required.
And because root depends on RxSwift 6.0.0..<7.0.0, version solving failed.
There are many changes from version 5.0.0 to 6.0.0 and I think Moya need to be updated to support latest RxSwift.
I am facing with the same issue.
Specs satisfying theRxSwift (~> 6.0.0), RxSwift (= 6.0.0, >= 6.0.0, ~> 6.0, ~> 6.0.0), RxSwift (~> 5.0)dependency were found, but they required a higher minimum deployment target.
@kodakvn the point is that, in my opinion (and I may be wrong), I shouldn't be forced to wait for Moya new release to use an updated version of a completely unrelated library (that's the case of RxSwift when you use Carthage and you just don't want RxMoya because you'd like to wrap stuff into Observables yourself).
Since there's a major involved for Moya, and major usually means "breaking changes", i think this could be the right moment to discuss such a change. It's not the first time I see this happening: when Apple deprecated UIWebViews, RxSwift dropped their support in v5.0 and yet we had to wait for Moya for months to simply update the podspec (there's usually no change involved at all in RxSwift files).
... see also #2134
Just chipping in here - another good reason to move all of the reactive extensions into separate repos and libraries is so those of us who do not want to use any of the reactive extensions are not forced to pull down RxSwift, ReactiveSwift etc. when we don't need them. I know they don't get linked to our targets unless we add them as dependencies but SPM will still fetch every dependency listed in the Package.swift file.
SPM also only supports one package file per repo so the only solution to this problem is to move the separate libraries into separate repos. We have to work around this by maintaining a fork with these dependencies removed from the Package.swift file.
i don't like RxSwift.
Most helpful comment
+1
I think that it can be split into three repositories: Moya, RxMoya, ReactiveMoya.