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
refactor(ivy): LView is a proper linked list #28382
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but needs a test for the new behavior we want to support (e.g. using injector.get to get ViewContainerRef
.
Also needs symbol test updates and linting.
9d3e2e3
to
c3b5066
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it possible to also remove views? Shouldn't CHILD_HEAD
/CHILD_TAIL
be updatd in that case?
b6e7747
to
213690f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, like how much more intuitive the data structures are.
b2c80e7
to
f4b407b
Compare
export function addToViewTree<T extends LView|LContainer>(lView: LView, lViewOrLContainer: T): T { | ||
// TODO(benlesh/misko): This implementation is incorrect, because it always adds the LContainer to | ||
// the end of the queue, which means if the developer asks for the LContainers out of order, the | ||
// change detection will run out of order. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^ Still needs resolution
@benlesh To clarify, the feedback that still needed resolution was that we need a better comment. I don't see why improving the comment needs to wait until the next PR.
|
google3 presumit fails... please update and remove the "cleanup" label when ready |
9624296
to
a43b0bc
Compare
a43b0bc
to
f6370e1
Compare
7b59f8f
to
a9a69e7
Compare
- Removes CONTAINER_INDEX - LView[PARENT] now contains LContainer when necessary - Removes now unused arguments to methods after refactor
- TView no longer stores childIndex - LView now as CHILD_HEAD and CHILD_TAIL TView used to store the head of the list, therefor all LViews had to have the same head, which is incorrect.
a9a69e7
to
71494ea
Compare
Google3 detected circular references here, so splitting up this rather hodge-podge list of functions into slightly better organizational units.
71494ea
to
3f633a1
Compare
this pr still fails on g3 presubmit. adding "cleanup" label. root cause:
|
@IgorMinar that's an old presubmit, it's passing now: https://test.corp.google.com/ui#id=OCL:232328029:BASE:235220976:1550861966438:b7aecde3 |
- TView no longer stores childIndex - LView now as CHILD_HEAD and CHILD_TAIL TView used to store the head of the list, therefor all LViews had to have the same head, which is incorrect. PR Close #28382
Google3 detected circular references here, so splitting up this rather hodge-podge list of functions into slightly better organizational units. PR Close #28382
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
TView used to store the head of the list, therefor all LViews had to have the same head, which is incorrect.