-
Notifications
You must be signed in to change notification settings - Fork 3k
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
takeUntil docs wrong. #2160
Comments
Just for completion, a little code sample to reproduce: Calling
Calling
Edit:
|
Seems legit. I mean, I believe it should behave like you described. That said, RxJS v5 behaves just like RxJS v4 in this regard. So it has been like this for a very long time. |
For what it is worth. Rx.Net does not terminate on |
And... FWIW, xstream equivalent to takeUntil is endWhen, and it completes the result stream when the notifier stream completes. |
And FWIW³: I found this issue on ReactiveCocoa. |
Hey! We discussed this today at our meeting, notes here. We'd like to keep the status quo as far as behavior, but certainly the docs could call out this behavior explicitly, to prevent any confusion. |
I've updated the title of this issue and edited the original post to include the intention of what we need to do to resolve the issue. |
I ran into this as well. Please update the docs to match the behavior, or update the behavior to match the docs. |
@errorx666 would you be interested in contributing? |
Just stumbled into this, and then found this issue and this PR to fix the docs: #3035. Unfortunately the docs don't seem to be updated yet. I guess this is waiting on the next release? |
Just got burned by this also. Wonder how many other developers' time it's going to waste before the documentation finally gets updated ;) |
@ohjames I don’t know, would you like to update it? |
I just checked the docs at http://reactivex.io/rxjs/class/es6/Observable.js~Observable.html#instance-method-takeUntil, and they don't seem to be updated with the fix in #3035. The docs on the site read:
However, the PR changed this to:
martinsik@a82121a#diff-61e6203a9881d218587e80e948e9aef1R23 @jayphelps Do you know why the site is not up-to-date with the docs in the code? I don't know how they're generated or updated. |
@jayphelps I've asked last year how we can go about updating the docs. Just like @OliverJAsh says we don't know how these are generated or maintained. The docs have been completely incorrect wasting hours of developer's time for over a year now. |
@OliverJAsh @Karasuni ... The documentation build script has been broken for some time, it seems :( I manually updated the docs this morning and all is well. Going forward, we have a much better documentation effort going on over at github.com/reactivex/rxjs-docs, lead by @ladyleet. They're still in-development, but the goal is to never have this problem again. It's all volunteer work, so if you feel passionately about the documentation for RxJS, I strongly encourage you to spent some time with those fine and talented folks. It seems like we can close this one now. |
Possibly (hopefully) i'm jumping on this too soon, but http://reactivex.io/rxjs/class/es6/Observable.js~Observable.html#instance-method-takeUntil has not yet updated. Did the script already complete? |
@Dorus what's up there reflects what we have in |
@benlesh this issue is about the takeuntil docs being wrong, not out of sync with the stable. Sounds like a good idea to keep this open until the extra pr has been made + merged, as the take until docs are still wrong. I can try to take a stab at it any time soon, if others want, feel free to do so. |
@ReactiveX/rxjs-docs doesn't appear to be hosted anywhere. Are the docs being maintained separate of code then? I'd expect docs to be generated from the annotated code |
@Karasuni it'll be a combination of the two once the docs project is complete - but yes the docs will be generated from the annotated code. |
Recently I've observed the behaviour of an expression like Reading this ticket I've not understood if the missing completion event is expected or not, however in my opinion it should be considered as a bug. |
@maurocchi ... an empty observable doesn't emit a value, therefore it doesn't "notify". It's like subscribing to an event and never getting an event. |
I think we can close this issue, as the docs have moved and been updated since this was filed forever ago. |
EDIT: (blesh) We need to update the docs
The docs should describe the behavior when the notifier passed to
takeUntil
does not emit, and instead completes. (for example,Observable.empty()
orObservable.timer(100).ignoreElements()
)Original Post
takeUntil
on reactivex.io states(emphasise is mine)
Similar, the docs state:
(emphasise is mine)
However, in the specs:
I think the correct behaviour would be to terminate when the
notifier
terminates, however at the very least the docs should be in line with the specs.The text was updated successfully, but these errors were encountered: