-
Notifications
You must be signed in to change notification settings - Fork 223
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
RxJava 3 Support #359
Comments
Alternatively - maybe we can use |
We'd also need to update static analysis tools to handle both. I think that could be easy if we basically just check the signature of |
we could also make the autodispose plugin more functional in nature, so we can skip the if-check. Main issue is that the plugins are written in java but the interop function would be kotlin |
Another incompatibility: That throws another wrench in trying to support both |
Seems like we're going to get a new package and groupId |
Better than before but still annoying for us as we'll need to release a new artifact pointing to that package as well. I wonder if there's a way we can support both in builds somehow |
After we release 1.4.0, we'll start 2.x snapshots pointing to rxjava 3 |
RxJava 3 is planned for later this year, but will use the same maven coordinates and package name. There is one significant change that affects AutoDispose: the
as()
operator has been folded back intoto()
, where the originalto()
overloads acceptingFunction
s has been replaced withas()
's use of custom converter interfaces.For Java consumers - this basically means no change is required from the AutoDispose side. Consumers would need to switch to
to()
, but all the staticautoDisposable()
APIs would work out of the box with that in RxJava 3. All we need to do is update docs for usage in both.This does present an interesting problem for the kotlin extensions though, which all call through to
.as()
under the hood and would no longer function in RxJava 3.My current thoughts right now are to try to avoid requiring a V2 for AutoDispose, and instead make RxJava 3 support somehow opt-in. An idea for this is to wrap support behind an abstraction in an rx3-only module compiled against rxjava 3. Then you can opt in the kotlin extensions to this via new AutoDispose plugin, and under the hood it would switch to use the rx3 support.
The rx3 support module would have something like this
Then in the main kotlin extensions we'd do something like this
We'd need to add some sort of proguard warning suppression for consumers not using rx3 to safely ignore it missing from the classpath
The text was updated successfully, but these errors were encountered: