-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
1.x: Remove 'Completable' prefix from nested interfaces, move its subscription to top-level. #4425
Conversation
Current coverage is 84.23% (diff: 68.04%)@@ 1.x #4425 diff @@
==========================================
Files 270 270
Lines 17518 17548 +30
Methods 0 0
Messages 0 0
Branches 2677 2677
==========================================
- Hits 14785 14781 -4
- Misses 1877 1909 +32
- Partials 856 858 +2
|
Looks okay. What about the |
Oh, sure. I'll add them in real quick. I wasn't sure on your stance on them, but I think it'll make migration easier. |
Yes, having deprecated markers is more forgiveable than lacking the entire type. I don't know how extensively |
Updated! |
|
||
/** | ||
* Convenience interface and callback used by the lift operator that given a child CompletableSubscriber, | ||
* return a parent CompletableSubscriber that does any kind of lifecycle-related transformations. | ||
*/ | ||
public interface CompletableOperator extends Func1<CompletableSubscriber, CompletableSubscriber> { | ||
public interface Operator extends Func1<rx.CompletableSubscriber, rx.CompletableSubscriber> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not certain about this being a compatible change.
So does this still compile?
CompletableOperator op = new CompletableOperator() {
@Override
public Completable.CompletableSubscriber call(Completable.CompletableSubscriber cs) {
return cs;
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm yeah it's not possible to provide perfect migration using this strategy. The covariant return type works but not the argument. We could provide overloads of lift
, compose
, and subscribe
which accepted the old types, adapted them to the new type, and were marked as deprecated. That should provide perfect compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, how about the old ones not extending the new ones and have wrappers inside those methods of the old types?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated with overloads
…tion to top-level.
Compilation issue resolved. |
I know, still waiting for a second approval. |
Okay, let's have this. One can complain anytime later. |
This is only the
Completable
part of #4420. It does not makeCompletableSubscriber
an abstract class nor createSingle.Operator
.