You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After previous issue got fixed I've tried to update us again. The app is now rendering and there are no untrack related errors, however it looks like reactivity graph isn't properly connecting.
On the screenshots you can see how I both inspect one of our reactive values and log it using interval. When draft.attaches.isEmpty is changed interval starts outputting different value, however $inspect is never running again. And the only difference made to the repo is svelte dependency updated. With 5.19.0 everything works just fine.
One more thing is that even in our codebase it's not 100% reproduceable in every place where draft.attaches.isEmpty is used. Somewhere it keeps working just fine and somewhere it breaks.
I think one last thing that is important - we are heavily using classes. So everything - root store, draft, attaches are all classes with $state runes inside.
Reproduction
For now I've spent some hours unsuccessfully hunting for the repro. So decided to open an issue anyway at least with these screenshots. Will keep hunting for the repro, but any help and guesses in the meantime are highly appreciated.
Logs
System Info
Svelte 5.19.2 or 5.19.3
Severity
blocking an upgrade
The text was updated successfully, but these errors were encountered:
gyzerok
changed the title
5.19.2 (and 5.19.3) fixed untrack error, but breaks reactivity graph somewhere
5.19.2 (and 5.19.3) fixed untrack error, but reactivity graph is broken somewhere
Jan 25, 2025
The fix you reference is for a genuine bug fix. If you're inside untrack, and you create a derived, it will now correctly be associated to the derived you're already in. That means that if that derived runs again, it will destroy the old derived that was there before – meaning it will no longer be connected to the reactivity graph. The derived can still run, it will just act like a regular function instead.
Previously, this was causing the deriveds created inside to "leak" and never get disconnected, which is why the bug fix was added around untrack.
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
After previous issue got fixed I've tried to update us again. The app is now rendering and there are no
untrack
related errors, however it looks like reactivity graph isn't properly connecting.On the screenshots you can see how I both inspect one of our reactive values and log it using interval. When
draft.attaches.isEmpty
is changed interval starts outputting different value, however$inspect
is never running again. And the only difference made to the repo issvelte
dependency updated. With 5.19.0 everything works just fine.One more thing is that even in our codebase it's not 100% reproduceable in every place where
draft.attaches.isEmpty
is used. Somewhere it keeps working just fine and somewhere it breaks.I think one last thing that is important - we are heavily using classes. So everything - root store, draft, attaches are all classes with
$state
runes inside.Reproduction
For now I've spent some hours unsuccessfully hunting for the repro. So decided to open an issue anyway at least with these screenshots. Will keep hunting for the repro, but any help and guesses in the meantime are highly appreciated.
Logs
System Info
Severity
blocking an upgrade
The text was updated successfully, but these errors were encountered: