-
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
rename AsyncEmitter to Emitter #4580
Conversation
👍 |
Current coverage is 84.57% (diff: 93.90%)@@ 1.x #4580 diff @@
==========================================
Files 272 274 +2
Lines 17571 17807 +236
Methods 0 0
Messages 0 0
Branches 2683 2727 +44
==========================================
+ Hits 14822 15060 +238
+ Misses 1884 1880 -4
- Partials 865 867 +2
|
Thanks for review @akarnokd . I take it we have to wait for 1.3 to break the api of experimental |
Deleting experimental APIs has to wait one patch version so 1.2.1 will have both and 1.2.2 can remove the AsyncEmitter. |
OK I'll patch again once 1.2.1 is out. On Thu, 22 Sep 2016, 21:25 David Karnok notifications@github.com wrote:
|
*/ | ||
@Experimental | ||
@Deprecated | ||
public interface AsyncEmitter<T> extends Observer<T> { |
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.
You could make this extend from Emitter
to avoid having two implementations of the operator.
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.
+1 to this, otherwise I'm 👍 for renaming
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.
cannot extend Emitter
because of two versions of Cancellable
. Would break existing AsyncEmitter
use.
* A functional interface that has a single close method | ||
* that can throw. | ||
*/ | ||
interface Cancellable { |
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.
You could move this into rx.functions
to decouple it from the emitter. Also CompletableEmitter
needs to handle the change in some way.
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.
seems like a good idea to decouple. CompletableEmitter
is an interface so I can't just add a method and deprecate the old one. How about I add a @Deprecated
annotation to CompletableEmitter
at the class level now, then after next release I remove the annotation and fix the signature of setCancellation
?
Make the cancelable interfaces extend each other as well. On Thu, Sep 22, 2016, 6:33 PM Dave Moten notifications@github.com wrote:
|
Good idea, thanks |
Um I don't think it's worth it juggling with inheritance of these interfaces. Straight after next release I'm just going to delete the deprecated stuff. |
93c5b45
to
5214637
Compare
I've added a |
5214637
to
f69f4b2
Compare
Forgot to move |
/** | ||
* A functional interface that has a single close method that can throw. | ||
*/ | ||
public interface Cancellable { |
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.
Experimental / since tag missing
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.
done, ta
f69f4b2
to
44bf8a8
Compare
Thanks for working this out! |
as per discussion in #4577, renaming
AsyncEmitter
toEmitter
via deprecation.There is a catch though.
CompletableEmitter
is correctly named now and depends onAsyncEmitter
via the method:When can we break the api of that class?