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

BUG: Subject#closed not set on complete or error and ObjectUnsubscribedError is nonsense. #7209

Closed
benlesh opened this issue Mar 8, 2023 · 2 comments · Fixed by #7211
Closed
Assignees
Labels
8.x Issues and PRs for version 8.x AGENDA ITEM Flagged for discussion at core team meetings bug Confirmed bug

Comments

@benlesh
Copy link
Member

benlesh commented Mar 8, 2023

Issues:

  1. ObjectUnsubscribedError is only thrown when a Subject is closed.
  2. closed is not true if the subject is completed or errored.
  3. There's HOT PATH code in every next, error, complete, and subscribe of every Subject to check to see if we need to throw an ObjectUnsubscribedError.
  4. No one has seen the benefit of ObjectUnsubscribedError in practice.

Related: #7200

@benlesh benlesh self-assigned this Mar 8, 2023
@benlesh benlesh added bug Confirmed bug AGENDA ITEM Flagged for discussion at core team meetings 8.x Issues and PRs for version 8.x labels Mar 8, 2023
@benlesh
Copy link
Member Author

benlesh commented Mar 8, 2023

Related #7202

@benlesh
Copy link
Member Author

benlesh commented Mar 8, 2023

Note: new ObjectUnsubscribedError() constructor has been deprecated for more than 2 years. It's okay to remove in v8.

benlesh added a commit to benlesh/rxjs that referenced this issue Mar 8, 2023
…plete()` and `error()`. Removed `ObjectUnsubscribedError`. Unsubscribed subjects will no longer throw.

BREAKING CHANGE: `ObjectUnsubscribedError` is no longer exported. The constructor was long deprecated. If you need a similar error, you can construct and throw your own. RxJS no longer throws this error.

BREAKING CHANGE: `Subject#closed` is no longer writeable. That was never an intended API. If you need to silently close a `Subject`, call `Subject#unsubscribe()`.

BREAKING CHANGE: Windows from `windowToggle` will no longer through if leaked and subscribed outside of the main subscription. There's no real use case for this behavior. If you find you needed this behavior, please file and issue.

fixes ReactiveX#7200
fixes ReactiveX#7209
benlesh added a commit to benlesh/rxjs that referenced this issue Mar 22, 2023
…plete()` and `error()`. Removed `ObjectUnsubscribedError`. Unsubscribed subjects will no longer throw.

BREAKING CHANGE: `ObjectUnsubscribedError` is no longer exported. The constructor was long deprecated. If you need a similar error, you can construct and throw your own. RxJS no longer throws this error.

BREAKING CHANGE: `Subject#closed` is no longer writeable. That was never an intended API. If you need to silently close a `Subject`, call `Subject#unsubscribe()`.

BREAKING CHANGE: Windows from `windowToggle` will no longer through if leaked and subscribed outside of the main subscription. There's no real use case for this behavior. If you find you needed this behavior, please file and issue.

fixes ReactiveX#7200
fixes ReactiveX#7209
benlesh added a commit to benlesh/rxjs that referenced this issue Apr 4, 2023
…plete()` and `error()`. Removed `ObjectUnsubscribedError`. Unsubscribed subjects will no longer throw.

BREAKING CHANGE: `ObjectUnsubscribedError` is no longer exported. The constructor was long deprecated. If you need a similar error, you can construct and throw your own. RxJS no longer throws this error.

BREAKING CHANGE: `Subject#closed` is no longer writeable. That was never an intended API. If you need to silently close a `Subject`, call `Subject#unsubscribe()`.

BREAKING CHANGE: Windows from `windowToggle` will no longer through if leaked and subscribed outside of the main subscription. There's no real use case for this behavior. If you find you needed this behavior, please file and issue.

fixes ReactiveX#7200
fixes ReactiveX#7209
benlesh added a commit that referenced this issue Apr 4, 2023
…plete()` and `error()`. Removed `ObjectUnsubscribedError`. Unsubscribed subjects will no longer throw.

BREAKING CHANGE: `ObjectUnsubscribedError` is no longer exported. The constructor was long deprecated. If you need a similar error, you can construct and throw your own. RxJS no longer throws this error.

BREAKING CHANGE: `Subject#closed` is no longer writeable. That was never an intended API. If you need to silently close a `Subject`, call `Subject#unsubscribe()`.

BREAKING CHANGE: Windows from `windowToggle` will no longer through if leaked and subscribed outside of the main subscription. There's no real use case for this behavior. If you find you needed this behavior, please file and issue.

fixes #7200
fixes #7209
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.x Issues and PRs for version 8.x AGENDA ITEM Flagged for discussion at core team meetings bug Confirmed bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant