Skip to content

refactor: use isObservable provided by rxjs 6.1+#27668

Closed
ghost wants to merge 1 commit intomasterfrom
unknown repository
Closed

refactor: use isObservable provided by rxjs 6.1+#27668
ghost wants to merge 1 commit intomasterfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Dec 14, 2018

Refactor common, core, forms, router to use the isObservable method from rxjs 6.1+. Remove the isObservable method from core.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe: rxjs isObservable also checks list and typeof Observable (additional on top of removed method)

What is the current behavior?

isObservable is implemented internally

Issue Number: N/A

What is the new behavior?

isObservable is imported from rxjs

Does this PR introduce a breaking change?

  • Yes
  • No - I don't believe so

Other information

Here is the TODO
Opening a feature request to find more information and request that isPromise gets the same treatment.

Copy link
Copy Markdown
Contributor

@IgorMinar IgorMinar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome! thank you

@IgorMinar IgorMinar added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Dec 14, 2018
@IgorMinar
Copy link
Copy Markdown
Contributor

@IgorMinar IgorMinar self-assigned this Dec 14, 2018
@IgorMinar
Copy link
Copy Markdown
Contributor

This PR requires internal refactoring which I submitted as http://cl/225629766. The submission of this PR is blocked until that change is approved and submitted.

@IgorMinar IgorMinar added state: blocked action: merge The PR is ready for merge by the caretaker and removed action: merge The PR is ready for merge by the caretaker labels Dec 15, 2018
@trotyl
Copy link
Copy Markdown
Contributor

trotyl commented Dec 15, 2018

Need also bump the rxjs peerDependency version from ^6.0.0 to ^6.1.0.

@IgorMinar
Copy link
Copy Markdown
Contributor

oh. shoot. I thought we bumped the rxjs version to v6.1 in v7, but obviously we haven't.

that means that this Pr needs to wait even longer until we open master for 8.x development.

@IgorMinar IgorMinar removed the action: merge The PR is ready for merge by the caretaker label Dec 15, 2018
@IgorMinar IgorMinar added this to the v8-candidates milestone Dec 15, 2018
@ngbot ngbot bot removed this from the v8-candidates milestone Dec 15, 2018
@ghost
Copy link
Copy Markdown
Author

ghost commented Dec 16, 2018

Should I bump the version as part of this PR, or is that something done separately?

@sarunint
Copy link
Copy Markdown
Contributor

@ChrisDahmCS That's done separately.

@benlesh benlesh added the area: core Issues related to the framework runtime label Jan 8, 2019
@ngbot ngbot bot added this to the needsTriage milestone Jan 8, 2019
@IgorMinar IgorMinar modified the milestones: needsTriage, v8-candidates Jan 8, 2019
@trotyl
Copy link
Copy Markdown
Contributor

trotyl commented Apr 23, 2019

This should be unblocked now by #30032

@ghost ghost requested review from a team November 16, 2019 04:12
@googlebot
Copy link
Copy Markdown

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@atscott atscott removed the request for review from a team August 13, 2020 18:27
@pullapprove pullapprove bot removed the request for review from IgorMinar August 13, 2020 18:27
@atscott
Copy link
Copy Markdown
Contributor

atscott commented Aug 13, 2020

Hi @ChrisDahmCS - could you rebase this PR or check the "Allow edits by maintainers" box so that we can perform the rebase ourselves and push to your branch?

@ghost
Copy link
Copy Markdown
Author

ghost commented Aug 13, 2020

Hey @atscott! I do have the "allow edits by maintainers" option selected. It looks like there were updates from another maintainer as well, I don't know if this affects.

@atscott
Copy link
Copy Markdown
Contributor

atscott commented Aug 13, 2020

Hey @atscott! I do have the "allow edits by maintainers" option selected. It looks like there were updates from another maintainer as well, I don't know if this affects.

Ah, indeed that's right. When I tried to push up my local rebased branch, I forgot it was named differently than your remote so the push was rejected.

Copy link
Copy Markdown
Contributor

@atscott atscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactor common, core, forms, router to use the isObservable method from rxjs 6.1+.
Remove the isObservable method from core.
@petebacondarwin
Copy link
Copy Markdown
Contributor

As described here #39643 (comment), it is not possible, nor favourable, to land this change. The RxJS isObservable() requires that the object contains not only a subscribe() method but also a lift() method. I guess this is what distinguishes an Observable from a Subscribable, which is what our EventEmitter really is. Moreover, bringing in the RxJS isObservable() actually increased the distributable size, so it is actually better to keep our own implementation.

@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 14, 2020
@pullapprove pullapprove bot added area: common Issues related to APIs in the @angular/common package area: dev-infra Issues related to Angular's own dev infra (build, test, CI, releasing) area: forms area: router area: testing Issues related to Angular testing features, such as TestBed labels Dec 14, 2020
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Dec 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area: common Issues related to APIs in the @angular/common package area: core Issues related to the framework runtime area: dev-infra Issues related to Angular's own dev infra (build, test, CI, releasing) area: forms area: router area: testing Issues related to Angular testing features, such as TestBed cla: yes target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.