Skip to content

Conversation

@trueadm
Copy link
Contributor

@trueadm trueadm commented Mar 4, 2025

This fixes #15414. However, we have a test that fails with this change derived-write-read-write-read. That's because the new logic prevents over-firing the effect in this case, as per design.

So we have two options:

  • we state that deriveds are pure and thus can over-fire in some cases – this is already true for unowned deriveds. There's nothing technically wrong with this behaviour.
  • we remove the existing failing test and go with this strategy

@svelte-docs-bot
Copy link

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2025

Playground

pnpm add https://pkg.pr.new/svelte@15434

@changeset-bot
Copy link

changeset-bot bot commented Mar 4, 2025

🦋 Changeset detected

Latest commit: 3028e7a

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

@paoloricciuti
Copy link
Member

I would say if we have to chose I lean towards keeping the test and just state that deriveds can overfire

@trueadm trueadm closed this Mar 4, 2025
@trueadm
Copy link
Contributor Author

trueadm commented Mar 4, 2025

Agreed

@trueadm trueadm deleted the sync-versions branch March 4, 2025 19:52
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.

$derived unexpectedly reevaluate

3 participants