svelte icon indicating copy to clipboard operation
svelte copied to clipboard

Svelte 5 REPL: Error compiling component (too much recursion)

Open qupig opened this issue 1 year ago • 8 comments

Describe the bug

err

This error is often encountered when opening a Svelte5-REPL link. It can return to normal after refreshing the tab.

Note that this may happen when opening any REPL links, not just during editing.

Reproduction

Unable to reproduce the issue, randomly occurs when opening REPL links.

Logs

Console cleared. index-ZdIW0gts.js:80:743
running Svelte compiler version 5.0.0-next.148 index-ZdIW0gts.js:80:759
Error: too much recursion
    Immutable 2
index-ZdIW0gts.js:83:550

System Info

Firefox ESR
Across multiple Svelte5 versions including the latest.

Severity

annoyance

qupig avatar Jun 03 '24 16:06 qupig

I thought I was the only one, I also see this regularly. I'm also on Firefox, maybe that's relevant?

Prinzhorn avatar Jun 03 '24 17:06 Prinzhorn

It's hard to debug without any examples or links. If you have some, please share :)

trueadm avatar Jun 03 '24 19:06 trueadm

I also see this periodically, on Firefox. Providing links is probably going to be difficult, because, as others have mentioned, refreshing the page (reloading the same REPL contents from the URL fragment) makes the issue go away.

Conduitry avatar Jun 03 '24 19:06 Conduitry

Would be good to have a perf recording from Firefox dev tools then. I've tried a lot to try and break it in FF and nothing for me. Maybe some certain code patterns are what causes it in the compiler? Either way, it's impossible to debug without some input.

trueadm avatar Jun 03 '24 19:06 trueadm

@trueadm If you must have a link, use the REPL link in the official documentation, I'm sure I've seen this happen at some point when I opened it. You will need some luck.

e

qupig avatar Jun 03 '24 20:06 qupig

FWIW i see this constantly, it's the bane of my life, but i haven't managed to isolate it yet

Rich-Harris avatar Jun 06 '24 22:06 Rich-Harris

too much recursion

Actually, the issue seems to exist in Svelte-4-REPL as well:

running Svelte compiler version 4.2.18 [index-pEPW5OQ2.js:64:4194](https://svelte.dev/_app/immutable/workers/index-pEPW5OQ2.js)
Error: too much recursion
    Immutable 2
        transform
        runHook
[index-pEPW5OQ2.js:64:4861](https://svelte.dev/_app/immutable/workers/index-pEPW5OQ2.js)

qupig avatar Jun 11 '24 21:06 qupig

The bane of my life these days is Firefox. It's so inconsistent with other browsers and lags behind in spec compliance.

trueadm avatar Jun 11 '24 21:06 trueadm