Skip to content

fix: prevent await_reactivity_loss in notify_version - #16915

Merged
Rich-Harris merged 6 commits into
sveltejs:version-3from
GauBen:fix-16914
Aug 27, 2026
Merged

fix: prevent await_reactivity_loss in notify_version#16915
Rich-Harris merged 6 commits into
sveltejs:version-3from
GauBen:fix-16914

Conversation

@GauBen

@GauBen GauBen commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

closes #16914

The fix was trivial, the test was painful to write and requied ai assistance

  • runs in its own file to set DEV to true globally
  • has a hand-written svelte component to reproduce the issue

The diff is big because I bumped svelte to latest


Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

Edits

  • Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed.

@pkg-svelte-dev

pkg-svelte-dev Bot commented Aug 23, 2026

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from ff38365:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/ff383655a9535fe8c0054d5556ad5a3ca9d77de3

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/kit/pr/16915

Note

This PR is from a fork. A maintainer must approve approve each commit before it can be built and installed.

@changeset-bot

changeset-bot Bot commented Aug 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ff38365

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

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit 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

Nic-Polumeyv
Nic-Polumeyv previously approved these changes Aug 23, 2026

@Nic-Polumeyv Nic-Polumeyv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! It might be worth doing a bigger change in the future, since this is an issue in a few places that would need to be wrapped in untrack. I'm in favor of not using runes for internal bookkeeping, as that's really the root of the problem. We could also have the svelte compiler disarm at the expression boundary instead of queueing? I haven't looked into this enough, but we can circle back. Better to get @Rich-Harris opinion, not really my lane.

@Nic-Polumeyv

Nic-Polumeyv commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Closing in favour of fixing this in svelte. sveltejs/svelte#18694 removes the prod throw and sveltejs/svelte#18702 removes the warning. once both are released. kit raises its svelte floor and no untrack is needed here. Thanks for the report and the repro, it's what led to fixing this!

@Nic-Polumeyv

Copy link
Copy Markdown
Contributor

Reopening, untrack is the right fix. The read after await fetch in remote_request warns as designed. sveltejs/svelte#18694 still covers the prod throw.

@Nic-Polumeyv Nic-Polumeyv reopened this Aug 24, 2026

@Nic-Polumeyv Nic-Polumeyv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@Rich-Harris
Rich-Harris merged commit 8a587c7 into sveltejs:version-3 Aug 27, 2026
36 of 37 checks passed
@Rich-Harris

Copy link
Copy Markdown
Member

thank you!

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] await_reactivity_loss / Detected reactivity loss when reading _updated.

3 participants