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

Fix adjacent tracking across adjacent scopes - #1985 #1986

Merged
merged 1 commit into from
Jan 16, 2019
Merged

Conversation

evs-chris
Copy link
Contributor

This sets deps of a reference as mutated along with the reference so that update code is not skipped for the reference deps if they also happen to appear in an adjacent scope.

This is an area that could probably use a little bit of improvement down the road. Right now, deps on any given expression don't really indicate which parts are affected by mutation e.g. in {#each foo[bar] as whatever}<button on:click={() => whatever.sure += 'yes'}>mutate foo, but not bar</button>{/each}. With this PR, bar will also be flagged as mutated, which isn't exactly ideal, as it's not in this case.

@Rich-Harris
Copy link
Member

👍

Yeah, I was thinking about that foo/bar problem. I think it's solvable. Definitely something we can worry about later though

@Rich-Harris Rich-Harris merged commit dfb661e into master Jan 16, 2019
@Rich-Harris Rich-Harris deleted the gh-1985 branch January 16, 2019 01:41
@evs-chris
Copy link
Contributor Author

Also, I just checked and it looks like this fixes #1917 too.

@Rich-Harris
Copy link
Member

nice! closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants