-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReactiveCompatible is a class protocol in RxSwift 6 #2270
Comments
Hey @groue - Thanks for reporting :) Luckily, you can make a wrapper to resolve this issue: struct MyObject { }
extension MyObject {
struct Rx {
private let base: MyObject
init(_ base: MyObject) { self.base = base }
}
}
public extension MyObject.Rx {
/// Reactive extensions
} Everything else can remain as-is. Does this solution accommodate that specific use-case? |
Thanks for your help and explanation 👍 ! I have too many structs to extend, so I'll basically have to restore the old I'll close this issue. Maybe, if several users report similar problems, this breaking change will turn into a regression that deserves to be addressed. |
I also find myself using ReactiveCompatible with many models that are structs |
So do I. |
Short description of the issue:
ReactiveCompatible
is a class-only protocol in RxSwift 6, which prevents declaring handy.rx
extensions on structs. This affects the RxGRDB repository.Expected outcome:
ReactiveCompatible
can be declared on struct extension, OR there exists another way to declare handy.rx
extensions on structs.What actually happens:
Compiler complains, and I don't know how to manage this breakage.
Self contained code example that reproduces the issue:
RxSwift/RxCocoa/RxBlocking/RxTest version/commit
RxSwift 6.0.0
Platform/Environment
How easy is to reproduce? (chances of successful reproduce after running the self contained code)
Xcode version:
The text was updated successfully, but these errors were encountered: