sveltejs / svelte

Cybernetically enhanced web apps
https://svelte.dev
MIT License
77.4k stars 4.03k forks source link

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

Open qupig opened 3 weeks ago

qupig commented 3 weeks ago

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

Prinzhorn commented 3 weeks ago

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

trueadm commented 3 weeks ago

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

Conduitry commented 3 weeks ago

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.

trueadm commented 3 weeks ago

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.

qupig commented 3 weeks ago

@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

Rich-Harris commented 3 weeks ago

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

qupig commented 2 weeks ago

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)
trueadm commented 2 weeks ago

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