Skip to content

fix: never write to ´v´ property in forks#17998

Open
dummdidumm wants to merge 1 commit intomainfrom
fork-never-write-to-v
Open

fix: never write to ´v´ property in forks#17998
dummdidumm wants to merge 1 commit intomainfrom
fork-never-write-to-v

Conversation

@dummdidumm
Copy link
Copy Markdown
Member

Forks were reverting their writes directly after initial execution, and subsequent derived sets were also only updating batch_values - but that's not catching all cases. The source the async derived writes to once something has resolved to for example wasn't handled by this.

Therefore this PR tweaks the logic such that we never write to .v in forks.

I'm also wondering if we need to compare against batch_values inside equals when in a fork, but since no tests fail I only added a TODO comment.

Forks were reverting their writes directly after initial execution, and subsequent derived sets were also only updating batch_values - but that's not catching all cases. The source the async derived writes to once something has resolved to for example wasn't handled by this.

Therefore this PR tweaks the logic such that we never write to `.v` in forks.

I'm also wondering if we need to compare against `batch_values` inside `equals` when in a fork, but since no tests fail I only added a TODO comment.
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 24, 2026

⚠️ No Changeset found

Latest commit: 749b6f0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@github-actions
Copy link
Copy Markdown
Contributor

Playground

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

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.

1 participant