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

Commits on Jun 6, 2024

  1. 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 aliasing and 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.
    
    [ghstack-poisoned]
    josephsavona committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    eaee6c2 View commit details
    Browse the repository at this point in the history
  2. lint 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 aliasing and 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.
    
    [ghstack-poisoned]
    josephsavona committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    a6f6d35 View commit details
    Browse the repository at this point in the history
  3. 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 aliasing and 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.
    
    [ghstack-poisoned]
    josephsavona committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    d9bfe74 View commit details
    Browse the repository at this point in the history
  4. 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]
    josephsavona committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    5a0f82e View commit details
    Browse the repository at this point in the history
  5. 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]
    josephsavona committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    6315a4e View commit details
    Browse the repository at this point in the history
  6. 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]
    josephsavona committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    2fef771 View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2024

  1. 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]
    josephsavona committed Jun 7, 2024
    Configuration menu
    Copy the full SHA
    0a5761c View commit details
    Browse the repository at this point in the history