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
Attach location information to effects in development, so that it can be used when generating the error message. For simple cases where there's only a single effect involved we can do this sort of thing:
Uncaught Svelte error: effect_update_depth_exceeded
Maximum update depth exceeded in App.svelte:3:1. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops
If there are multiple effects running in a loop, the message could be more like this...
Uncaught Svelte error: effect_update_depth_exceeded
Maximum update depth exceeded. This can happen when a reactive block or effect repeatedly sets a new value. Svelte limits the number of nested updates to prevent infinite loops. Last ten effects:
...or we could try and be smarter about it so that we identify the actual loop (which aside from truly pathological cases should just be a case of going back until we see the most recent effect earlier in the stack?)
Importance
nice to have
The text was updated successfully, but these errors were encountered:
The reason I went with the functions itself is that you get a link to the function location "for free", and it is correctly pointing to the source; either what you wrote (via sourcemaps) or what was generated (if sourcemaps are turned off) (which is still useful). Using the stack trace isn't gonna work because for that to be transformed into clickable links correctly you need the generated code location (file + position) info, and at the time when we apply the location information we only have the original code.
There's several places where we emit ${filename}:${line}:${column} in error and warning messages already, where it wouldn't make sense to print a function (because we're pointing to an element or an attribute or whatever) — I think there's value in consistency, especially since finding the clickable link involves clicking through a bunch of junk
Describe the problem
See #13231 (comment)
Describe the proposed solution
Attach location information to effects in development, so that it can be used when generating the error message. For simple cases where there's only a single effect involved we can do this sort of thing:
If there are multiple effects running in a loop, the message could be more like this...
...or we could try and be smarter about it so that we identify the actual loop (which aside from truly pathological cases should just be a case of going back until we see the most recent effect earlier in the stack?)
Importance
nice to have
The text was updated successfully, but these errors were encountered: