Skip to content
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

Children slot forwarding causes recursion svelte-5 migration #14171

Closed
machycek opened this issue Nov 5, 2024 · 0 comments · Fixed by #14224
Closed

Children slot forwarding causes recursion svelte-5 migration #14171

machycek opened this issue Nov 5, 2024 · 0 comments · Fixed by #14224
Labels

Comments

@machycek
Copy link

machycek commented Nov 5, 2024

Describe the bug

When you have a simple component that is forwarding a children slot in Svelte 4 and migrate to Svelte 5 it doesn't work correctly. It causes infinite recursion where snippet is calling itself.

#14127 / #14090 has already fixed named snippet and works really well, we just missed children prop.

Reproduction

https://svelte.dev/playground/hello-world?version=5.1.10#H4sIAAAAAAAAE21Qy2rDQAz8FaEW0kKI765j6C2nXtpbt4dNLCcLa2nZVR7F-N_LOnaaQo-a0cxo1CPbjrDEDXkvcJboG3iixik1z7jE1nlKWH72qN8h72UAl7PqNYRVOpHXjG1tov_wnbASa8ISq7SLLih4y_u1QU0Ga8MArgsSFTZyomi3nqCN0sFiVdyQ94ON1Eymi5c70YeIVxcmyeNOuiCc84qJKRw3dLmTVsX1jNqw4eo31JOWhzw53q_7dJDz5DCMFEtDIFx2ckxErBRvkyd7orFJlbwo_BUXYxBA_-BauGcyCFDNDYKNxPomDa37HDbU14XZNT83f-26bnA0Hum56jj3hWuH3PLWrDaMS1S6KJYajzR8DT9qZ7M--QEAAA==

this is Svelte 4 code and click on migration it produces following

https://svelte.dev/playground/hello-world?version=5.1.10#H4sIAAAAAAAAE31RTU-EMBD9K5O6yUJC4M6yqDdPxkRv4qHSwW1Spk3bXTUN_910KeyaGE-lb94H8xoY8RFZzR5QKQ2f2ioBGQrpUeSsYINU6Fj9Gpj_NpEXAVYsqntjSndC5SP2zh3-hfeaPJJ3rGaN6600HhSnj33HvOtY2xGAHI22Hh70CS1_VwiD1SNsy2pFng_cokim292V6EVr5aVJkk2vR6Mp5lVpUkkS-PVbSh7twHuEJ6uNgxBBgP4glbBIt3Uyz7ZJlZfPJI1B37xy-n5rd7PAzwn_8M_EqaN4KPQQ1pBiUcNUp9_Yw8bEjyzfddRUc1ltFDeXagA01aM-OsS4xXpTyE94bjPcuDl8zcoCHKKBpI8a3EF_pmoKIC0Qpnya9wl3FkmgvTRRZuG34MxN7Bs5XA-TCUCzvInhFsk_aoH7EJOmdqFcZS0llll-cVgeLwlCJYfzMFRptyk2tLbSdsQK5vHLs9rbI05v0w98KPbY2wIAAA==

Logs

No response

System Info

System:
    OS: macOS 14.6.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 9.94 GB / 64.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 20.11.0 - ~/.nvm/versions/node/v20.11.0/bin/node
    Yarn: 1.22.21 - /usr/local/bin/yarn
    npm: 10.2.4 - ~/.nvm/versions/node/v20.11.0/bin/npm
    Watchman: 2024.03.25.00 - /usr/local/bin/watchman
  Browsers:
    Brave Browser: 107.1.45.133
    Chrome: 130.0.6723.92
    Safari: 17.6
  npmPackages:
    svelte: ^5.0.0 => 5.1.3

Severity

blocking an upgrade

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants