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

fix(common): properly check NaN value #22305

Closed
wants to merge 1 commit into from
Closed

Conversation

trotyl
Copy link
Contributor

@trotyl trotyl commented Feb 19, 2018

closes #15721

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[x] 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:

What is the current behavior?

Issue Number: #15721, #18129

What is the new behavior?

When the previous value is a wrapped one but the new value is not (while they're same), this still indicates no change happened, should not throw. (but not the opposite)

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Note: #15723 cannot fix the problem alone.
#15723 is correct, my thoughts were wrong.

@vicb vicb added action: review The PR is still awaiting reviews from at least one requested reviewer area: core Issues related to the framework runtime labels Feb 20, 2018
@kevinmerckx
Copy link
Contributor

I'm very thankful for this fix. I hope it's gonna get merged soon!

@trotyl
Copy link
Contributor Author

trotyl commented Mar 16, 2018

Oops, just found out #15721 can only be fixed by combining this one and #15723 together...

EDIT: divided into two commits.

@trotyl trotyl changed the title fix(core): not throw when old value is wrapped while new value is same unwrapped one fix AsyncPipe checkNoChange with WrappedValue Mar 16, 2018
@ngbot
Copy link

ngbot bot commented Mar 20, 2018

Hi @trotyl! This PR has merge conflicts due to recent upstream merges.
Please help to unblock it by resolving these conflicts. Thanks!

2 similar comments
@ngbot
Copy link

ngbot bot commented Mar 20, 2018

Hi @trotyl! This PR has merge conflicts due to recent upstream merges.
Please help to unblock it by resolving these conflicts. Thanks!

@ngbot
Copy link

ngbot bot commented Mar 20, 2018

Hi @trotyl! This PR has merge conflicts due to recent upstream merges.
Please help to unblock it by resolving these conflicts. Thanks!

@headsetsniper
Copy link

Please, @trotyl can you finish this? It would be a huge help

@trotyl
Copy link
Contributor Author

trotyl commented Aug 17, 2018

@headsetsniper It's just waiting for review, conflicts are left deliberately to understand when would the review happening.

@SebastianAtWork
Copy link

Please, can someone review this PR? We now have to work around this issue. The PR is so small and would help a lot of people.

@SebastianAtWork
Copy link

@trotyl Could i review it? i cant merge it but is there something i could do? Its a huge pain in our current project and i cant believe its open since February. Maybe it gets merged quicker if someone resolves the conflicts?

@SebastianAtWork
Copy link

@trotyl Or even better, if we resolve the conflicts, i can reference this branch in our project until it gets merged, right?

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@trotyl
Copy link
Contributor Author

trotyl commented Oct 15, 2018

@SebastianAtWork Rebased, feel free to fetch and use, but better to checkout another branch if you want to keep it up-to-date.

@googlebot
Copy link

CLAs look good, thanks!

@SebastianAtWork
Copy link

@trotyl Thanks, unfortunately its currently not possible to build angular on a windows machine so i had to fix the core.js directly and made sure (per postpublish npm script) that the change is not overwritten on install. dirty fix but at least its working until someone accepts this pr

@Jarrich
Copy link

Jarrich commented Jan 17, 2019

I could really use this PR. Bump.

@trotyl trotyl requested a review from a team as a code owner April 16, 2019 14:33
@trotyl trotyl changed the title fix AsyncPipe checkNoChange with WrappedValue fix(common): properly check NaN value Apr 16, 2019
@trotyl
Copy link
Contributor Author

trotyl commented Apr 16, 2019

Have had a second thought, the change made in #15723 is correct and mine was wrong.

#18129 is likely a different issue (or not an issue) which I cannot reproduce.

@mhevery mhevery self-assigned this Apr 17, 2019
@mhevery mhevery added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Apr 17, 2019
@ngbot
Copy link

ngbot bot commented Apr 17, 2019

I see that you just added the PR action: merge label, but the following checks are still failing:
    failure status "ci/circleci: integration_test" is failing
    failure status "ci/circleci: test_aio" is failing
    failure status "ci/circleci: test_docs_examples_ivy" is failing
    pending missing required labels: PR target: *
    pending status "google3" is pending
    pending missing required status "ci/circleci: publish_snapshot"

If you want your PR to be merged, it has to pass all the CI checks.

If you can't get the PR to a green state due to flakes or broken master, please try rebasing to master and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help.

@mhevery
Copy link
Contributor

mhevery commented Apr 17, 2019

Have had a second thought, the change made in #15723 is correct and mine was wrong.

So should this be merged or closed?

@benlesh benlesh added the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Apr 18, 2019
@benlesh
Copy link
Contributor

benlesh commented Apr 18, 2019

@mhevery The other one was closed by @IgorMinar in favor of this one.

@trotyl We just need to get this one passing CI. :)

@trotyl
Copy link
Contributor Author

trotyl commented Apr 18, 2019

@mhevery Sorry for the confusion, I meant that my previous thoughts about WrappedValue is wrong, this should just be handled solely by change AsyncPipe.

@benlesh I'll fix the CI.

@trotyl
Copy link
Contributor Author

trotyl commented Apr 18, 2019

Hi @benlesh, I have rebased the change, the failure in DoCheck example seems to be a flake, which doesn't use async pipe and passed in my local environment.

@benlesh
Copy link
Contributor

benlesh commented Apr 19, 2019

presubmit

@benlesh benlesh added merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: patch This PR is targeted for the next patch release target: major This PR is targeted for the next major release and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews target: patch This PR is targeted for the next patch release labels Apr 19, 2019
@benlesh
Copy link
Contributor

benlesh commented Apr 20, 2019

@trotyl Can you put together a separate PR for the 7.2.x branch? I was unable to merge this into both there and master due to conflicts, so I'll target master with this one.

@trotyl
Copy link
Contributor Author

trotyl commented Apr 22, 2019

@benlesh Created #30023

@trotyl trotyl deleted the async-nan branch April 22, 2019 07:39
BioPhoton pushed a commit to BioPhoton/angular that referenced this pull request May 21, 2019
@angular-automatic-lock-bot
Copy link

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 Sep 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime cla: yes merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note state: Needs Design target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AsyncPipe breaks change detection with NaN values