-
Notifications
You must be signed in to change notification settings - Fork 190
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
Consolidate references and tags #1314
base: main
Are you sure you want to change the base?
Conversation
Upstreams the @Tracked decorator, making it part of the @glimmer/validator package, and removing the `trackedData` concept. The original concept did not really pan out and was used almost exclusively for @Tracked. This change will make it easier to refactor and consolidate the various tag/tracking concepts.
This PR finishes up the autotracking refactors that were done previously, making after-render effects that used to be handled by the render transaction handled instead by an EffectsManager. The EffectsManager essentially manages a number of caches, which it keeps in lists internally. Every time a render completes, these queues are scheduled to run, with every cache in the queue being checked in order to see if something has changed. If it has, the effect runs its update. The biggest change with this refactor is that the `didCreate`/`didUpdate` hooks used by classic components will now interleave with modifiers. Previously, they always ran _before_ all modifiers, regardless of whether the modifiers were children of a given component. In theory, this shouldn't be an issue, but if it is we can separate out the component hooks into a separate queue and restore the prevous ordering.
c163cf1
to
a19e581
Compare
a19e581
to
d76e312
Compare
d76e312
to
c851e14
Compare
@pzuraq what's the goal of this PR? How could someone best take over? |
@NullVoxPopuli the goal is to consolidate the tracking primitives so that we only have one set of primitives. Previously, we had the system of tags where you manually tracked tags. After a while, we realized we could represent everything pretty much as just Sources and Caches, where Sources represent root state and Caches represent derived state. Furthermore, these can both be implemented by the same underlying class and use the same interface ( With this refactor, references in templates just become caches or sources, and everywhere we're currently using tags manually can be simplified a lot. This PR does that simplification in Glimmer VM, though it would still need to be done in Ember to integrate. |
No description provided.