-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SvelteMap reactivity not fully fixed by #13877 #13947
Comments
This was super weird to debug...i kinda fixed it but then i went to write the test and it was not failing even when removing the fix...so i discovered that this is a behaviour that is specifically related to The reason it doesn't work is because const values are immediately read in dev so when it comes to setting the map it already has a reaction and the fix in #13877 doesn't work. Let me investigate further. |
I'll check if in our project it's only a problem in dev. Will report later. Thank you for your investigation! |
In our code the problem still exists even in the prod build. So either a different reproduce is needed or it's not a dev-only problem. I can try to check our code with version from your PR to see if it helps. Does it contain all the necessary pieces already @paoloricciuti? |
Technically it could not be a problem only in dev is a both derived are read before the |
Oh, unfortunately this still does not fix the issue in my project (sigh). Will continue looking for the right repro. Anyway, your fix left even less room for the issues to appear. Thank you! |
Mmm I really wonder what's going on |
Describe the bug
In #13877 there was a fix for
SvelteMap
, which fixed the original reported REPL, but was still a problem in our codebase. It seems I found what the issue is.@trueadm fyi
Reproduction
Here is the REPL.
The difference is calling
getAsync
the second time in{@const value1 = cache.getAsync(id)}
. This again ends up in the infinite loading state. In our case we are probably calling from some other place, but here I place it on the next line for the minimal repro purpose.Relevant piece from the playground inline for your convenience
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: