svelte icon indicating copy to clipboard operation
svelte copied to clipboard

Rendering a dynamic component within a dynamic component is broken

Open x0k opened this issue 6 months ago • 1 comments

Describe the bug

Regression in 5.34.0

Reproduction

REPL

Logs


System Info

System:
    OS: Linux 6.6 cpe:/o:nixos:nixos:24.11 24.11 (Vicuna)
    CPU: (12) x64 Intel(R) Core(TM) i5-10400F CPU @ 2.90GHz
    Memory: 3.91 GB / 15.56 GB
    Container: Yes
    Shell: 5.2.37 - /run/current-system/sw/bin/bash
  Binaries:
    Node: 24.1.0 - /nix/store/wnayblhh0555nwfccnzcqkzph52y4yby-nodejs-24.1.0/bin/node
    npm: 11.3.0 - /nix/store/wnayblhh0555nwfccnzcqkzph52y4yby-nodejs-24.1.0/bin/npm
    pnpm: 10.10.0 - /nix/store/52cvbcrszd9fxs0rzjrnf0jc802968cm-pnpm-10.11.1/bin/pnpm
  Browsers:
    Brave Browser: 136.1.78.102
  npmPackages:
    svelte: catalog: => 5.34.3

Severity

blocking an upgrade

x0k avatar Jun 14 '25 19:06 x0k

I am experiencing a similar issue. I haven't looked into exactly what broke under the hood, but when I woke up today my end to end tests were no longer passing. After hours of debugging I found that it was an issue with svelte's reactivity.

My tests pass with svelte 5.34.2 but fail with 5.34.3, everything else being equal. For now, I changed my project's svelte version to 5.34.2 to get unblocked.

RobertB4 avatar Jun 15 '25 05:06 RobertB4

@7nik similar to @RobertB4, I started seeing broken things with 5.34.3. I tried out 5.34.5 but the reactivity issues persist. I'm trying to debug to hone in a cause, sorry I don't have a short repro, but I thought I'd mention it in case you maintainers have a hint of what's up. Interestingly the issue seems to only happen when I build for production and not in dev mode.

edit: simply adding an $inspect over the related variable in my +page seems to fix the issue. I don't understand why! As does adding a bind:this to an unused variable on the relevant component.

edit: https://github.com/sveltejs/svelte/issues/16199 looks like my issue

@RobertB4 - how about you, does 5.34.5 fix your issue?

kyle-leonhard avatar Jun 18 '25 15:06 kyle-leonhard