Skip to content
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

Observable does not complete using Sync/Async between two instances of RxJS #3475

Closed
hansl opened this issue Mar 26, 2018 · 7 comments
Closed

Comments

@hansl
Copy link
Contributor

hansl commented Mar 26, 2018

Smallest reproduction: https://stackblitz.com/edit/rxjs-3475-reproduction?file=index.ts

This is an issue we found in the Angular DevKit when updating projects and RxJS does not get properly hoisted (either because different versions or no peer deps).

Basically:

  1. create an observable using Library 1
  2. pipe a sync operator from Library 2
  3. pipe an async operator from Library 1 (or 2)
  4. the original SafeSubscriber is stopped, but did not complete or error, therefore the new pipeline will never next or complete the first pipeline.
@kwonoj
Copy link
Member

kwonoj commented Mar 26, 2018

Dupe of #3443. Rx doesn't support multiple instance due to internal core behavior.

@kwonoj kwonoj closed this as completed Mar 26, 2018
@hansl
Copy link
Contributor Author

hansl commented Mar 26, 2018

@kwonoj Talking to @benlesh, it seems like this behaviour is officially supported.

You only use instanceof when whether or not you need a SafeSubscriber. All other instances you use the symbol-observable, which is the right behaviour. The problem is in SafeSubscriber, which Ben is looking at.

@kwonoj
Copy link
Member

kwonoj commented Mar 26, 2018

@benlesh mind chime in to share discussion in issue? I doubt even without instanceof check it'll work across different version / instances.

@kwonoj
Copy link
Member

kwonoj commented Mar 26, 2018

I'm leaving this closed for now and @benlesh can reopen per cases.

@benlesh benlesh reopened this Mar 26, 2018
@benlesh
Copy link
Member

benlesh commented Mar 26, 2018

This is a legit nasty bug. Working on the fix.

benlesh added a commit to benlesh/rxjs that referenced this issue Mar 26, 2018
Only fixes v6 and above, fix coming for v5 (stable) shortly

related ReactiveX#3475
benlesh added a commit to benlesh/rxjs that referenced this issue Mar 26, 2018
benlesh added a commit to benlesh/rxjs that referenced this issue Mar 26, 2018
benlesh added a commit to benlesh/rxjs that referenced this issue Mar 26, 2018
Only fixes v6 and above, fix coming for v5 (stable) shortly

related ReactiveX#3475
benlesh added a commit to benlesh/rxjs that referenced this issue Mar 26, 2018
Only fixes v6 and above, fix coming for v5 (stable) shortly

related ReactiveX#3475
benlesh added a commit to benlesh/rxjs that referenced this issue Mar 26, 2018
cartant pushed a commit to cartant/rxjs that referenced this issue Mar 27, 2018
Only fixes v6 and above, fix coming for v5 (stable) shortly

related ReactiveX#3475
@benlesh
Copy link
Member

benlesh commented Apr 2, 2018

This was fixed by #3477

@benlesh benlesh closed this as completed Apr 2, 2018
@lock
Copy link

lock bot commented Jun 5, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants