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

compiler: treat pruned scope outputs as reactive #29790

Merged
merged 7 commits into from
Jun 10, 2024
Prev Previous commit
Next Next commit
Update on "compiler: treat pruned scope outputs as reactive"
Mostly addresses the issue with non-reactive pruned scopes. Before, values from pruned scopes would not be memoized, but could still be depended upon by downstream scopes. However, those downstream scopes would assume the value could never change. This could allow the developer to observe two different versions of a value - the freshly created one (if observed outside a scope) or a cached one (if observed inside, or through) a scope which used the value but didn't depend on it.

The fix here is to consider the outputs of pruned reactive scopes as reactive. Note that this is a partial fix because of things like control variables — the full solution would be to mark these values as reactive, and then re-run InferReactivePlaces. We can do this once we've fully converted our pipeline to use HIR everywhere. For now, this should fix most issues in practice because PruneNonReactiveDependencies already does basic alias tracking (see new fixture).

[ghstack-poisoned]
  • Loading branch information
josephsavona committed Jun 6, 2024
commit 2fef7719e3fe27cb6dda267fd8c0a0f66f380578

This merge commit was added into this branch cleanly.

There are no new changes to show, but you can still view the diff.