Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Filter evaluation is broken #3

Open
@caitp

Description

@caitp

In trying to fix up some failing tests today, I came across a disabled test which chains multiple filters.

The test fails pretty badly, and it seems that filter evaluation is not really doing what it should be doing. That's OK, but we should fix this. Basically, the filter visitor is being passed change records, but subsequent chained filters are not receiving anything. So, when the filter is evaluated, the incorrect value is passed in, and subsequent chained filters receive no values at all. That's borked :(

The thing I'm not really understanding about the current implementation in JS, is why filter visitor which performs evaluation cares about the watch AST at all. Filters should be called in reaction to a change to their inputs or parameters (basically how a PureFunctionAST would work), and passed the current values of the change records (in my understanding).

The Dart code goes a bit further by evaluating the expressions for each argument, this may also be necessary, but to start with I think just passing the current values for the changed records should be enough.

I'll look into this next week

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions