Skip to content

Reactivity broken after ~5.43.0 #17281

@rallets

Description

@rallets

Describe the bug

Ref: https://github.com/sveltejs/svelte/issues/17239#issuecomment-3576002582

If you don't use any async features, probably it's better not to update Svelte until it's ready? Also, I agree that a separate experimental branch for both Svelte and Kit is probably better for all. There are a lot of core api reworks meant to fix async, but they also affect those who don't use the experimental features.

@henrykrinkle01 @dummdidumm
Hi, would you mind explain a bit better what this until it's ready means? We do not use the new async feature in components, all the async work is made in external stores. We got some production bugs due to something related to this issue: we just updated the svelte version, nothing else, app out in production for a while, so we are pretty sure the cause is Svelte itself.
After fixing this issue, it still persist the same problem, but we can say it's "better".
It's not easy to submit a minimal repro.
We need to keep svelte to 5.43.0 that is a working version. I saw in the latest versions some refactoring around the reactivity internals, that could be connected to this issue. Do you have any plans about when it could be done? Or we just need to wait for svelte 6 ?
Now our team has missed trust on Svelte release cycle, unfortunately, it's hard to disagree with them.

Here a repro the replicate our code pattern and the interesting part is:

// from svelte 5.43.0 the local store need to be resetted to be able to get an updated derived.
// this.selectedGroupId = undefined;
// this.selectedPointId = undefined;

NB. this repo is not replicating the bug.
In our real app we have many accordions that cause elements to be offscreen, so I think this could be related to the original issue I did point out.

I'm still unsure exactly which Svelte version has introduced the reactivity change, I will post more info later.

Reproduction

https://github.com/rallets/svelte-reactivity-issue

Logs

System Info

System:
    OS: Windows 11 10.0.26200
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700H
    Memory: 31.45 GB / 63.68 GB
  Binaries:
    Node: 22.20.0 - C:\Program Files\nodejs\node.EXE
    npm: 11.6.2 - C:\Program Files\nodejs\npm.CMD
    pnpm: 10.14.0 - C:\Users\mauro\AppData\Roaming\npm\pnpm.CMD
  Browsers:
    Chrome: 142.0.7444.176
    Edge: Chromium (140.0.3485.54)
    Internet Explorer: 11.0.26100.1882
  npmPackages:
    svelte: 5.43.0 => 5.43.0

Severity

blocking an upgrade

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting submitterneeds a reproduction, or clarification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions