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: improve proxy effect dependency tracking #10605

Merged
merged 1 commit into from
Feb 22, 2024
Merged

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Feb 22, 2024

When we mutate the version around the proxy version, we also need to disable mutation validation otherwise this can cause the version to trigger a schedule on the effect its in when initializing the version – which causes the test to get stuck in an infinite loop. Fixes #10603.

Copy link

changeset-bot bot commented Feb 22, 2024

🦋 Changeset detected

Latest commit: 21ce2da

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
svelte Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dummdidumm
Copy link
Member

Oh so you're saying #10603 was a bug after all?

@trueadm
Copy link
Contributor Author

trueadm commented Feb 22, 2024

Oh so you're saying #10603 was a bug after all?

Yes. Sorry, I never saw that issue.

@trueadm trueadm merged commit c10337c into main Feb 22, 2024
8 checks passed
@trueadm trueadm deleted the proxy-version-fix branch February 22, 2024 16:09
@svelte-kit-so-good
Copy link

Is this expected? infinite loop after couple toggles

@7nik
Copy link

7nik commented Feb 22, 2024

Is this expected? infinite loop after couple toggles

It's correct behaviour because you read items[id] in console.log.


What about this example? Somehow adding $inspect(items) causes the infinite loop again.

@trueadm
Copy link
Contributor Author

trueadm commented Feb 22, 2024

Is this expected? infinite loop after couple toggles

It's correct behaviour because you read items[id] in console.log.

What about this example? Somehow adding $inspect(items) causes the infinite loop again.

Fixed now.

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.

Svelte 5: $effect in child component unexpectedly being triggered by parent component $state change
4 participants